- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for ScanLines (0.04 sec)
-
src/bufio/scan.go
startBufSize = 4096 // Size of initial allocation for buffer. ) // NewScanner returns a new [Scanner] to read from r. // The split function defaults to [ScanLines]. func NewScanner(r io.Reader) *Scanner { return &Scanner{ r: r, split: ScanLines, maxTokenSize: MaxScanTokenSize, } } // Err returns the first non-EOF error that was encountered by the [Scanner]. func (s *Scanner) Err() error {
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Wed May 21 18:05:26 UTC 2025 - 14.2K bytes - Viewed (0) -
src/bufio/scan_test.go
genLine(tmp, lineNum, j, true) if j < smallMaxTokenSize { j++ } else { j-- } buf.Write(tmp.Bytes()) lineNum++ } s := NewScanner(&slowReader{1, buf}) s.Split(ScanLines) s.MaxTokenSize(smallMaxTokenSize) j = 0 for lineNum := 0; s.Scan(); lineNum++ { genLine(tmp, lineNum, j, false) if j < smallMaxTokenSize { j++ } else { j-- }
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Fri Sep 22 16:22:42 UTC 2023 - 14.3K bytes - Viewed (0)