- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for scanInts (0.12 sec)
-
src/text/scanner/scanner_test.go
for _, test := range []struct { in, want string mode uint }{ {"foo01.bar31.xx-0-1-1-0", "01 31 0 1 1 0", ScanInts}, {"foo0/12/0/5.67", "0 12 0 5 67", ScanInts}, {"xxx1e0yyy", "1 0", ScanInts}, {"1_2", "1_2", ScanInts}, {"xxx1.0yyy2e3ee", "1 0 2 3", ScanInts}, {"xxx1.0yyy2e3ee", "1.0 2e3", ScanFloats}, } { got := extractInts(test.in, test.mode) if got != test.want {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 17 03:41:50 UTC 2022 - 25.3K bytes - Viewed (0) -
src/text/scanner/scanner.go
// Predefined mode bits to control recognition of tokens. For instance, // to configure a [Scanner] such that it only recognizes (Go) identifiers, // integers, and skips comments, set the Scanner's Mode field to: // // ScanIdents | ScanInts | SkipComments // // With the exceptions of comments, which are skipped if SkipComments is // set, unrecognized tokens are not ignored. Instead, the scanner simply
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:57:51 UTC 2024 - 20.3K bytes - Viewed (0) -
src/fmt/scan_test.go
if err == io.ErrUnexpectedEOF { err = nil } return } r.next = next return } // scanInts performs the same scanning task as RecursiveInt.Scan // but without recurring through scanner, so we can compare // performance more directly. func scanInts(r *RecursiveInt, b *bytes.Buffer) (err error) { r.next = nil _, err = Fscan(b, &r.i) if err != nil { return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 23 20:25:13 UTC 2023 - 39.3K bytes - Viewed (0) -
src/go/internal/gccgoimporter/parser.go
} func (p *parser) initScanner(filename string, src io.Reader) { p.scanner.Init(src) p.scanner.Error = func(_ *scanner.Scanner, msg string) { p.error(msg) } p.scanner.Mode = scanner.ScanIdents | scanner.ScanInts | scanner.ScanFloats | scanner.ScanStrings p.scanner.Whitespace = 1<<'\t' | 1<<' ' p.scanner.Filename = filename // for good error messages p.next() } type importError struct { pos scanner.Position
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 02 23:14:07 UTC 2024 - 31.2K bytes - Viewed (0) -
src/fmt/scan.go
case *complex128: *v = s.scanComplex(verb, 128) case *int: *v = int(s.scanInt(verb, intBits)) case *int8: *v = int8(s.scanInt(verb, 8)) case *int16: *v = int16(s.scanInt(verb, 16)) case *int32: *v = int32(s.scanInt(verb, 32)) case *int64: *v = s.scanInt(verb, 64) case *uint: *v = uint(s.scanUint(verb, intBits)) case *uint8: *v = uint8(s.scanUint(verb, 8))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 21:56:20 UTC 2024 - 31.9K bytes - Viewed (0) -
src/database/sql/convert_test.go
{s: "256", d: &scanuint8, wanterr: "converting driver.Value type string (\"256\") to a uint8: value out of range"}, {s: "256", d: &scanuint16, wantuint: 256}, {s: "-1", d: &scanint, wantint: -1}, {s: "foo", d: &scanint, wanterr: "converting driver.Value type string (\"foo\") to a int: invalid syntax"}, // int64 to smaller integers {s: int64(5), d: &scanuint8, wantuint: 5},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 10 20:23:22 UTC 2024 - 17K bytes - Viewed (0)