- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for MaxTokenSize (0.1 sec)
-
src/bufio/export_test.go
import ( "unicode/utf8" ) var IsSpace = isSpace const DefaultBufSize = defaultBufSize func (s *Scanner) MaxTokenSize(n int) { if n < utf8.UTFMax || n > 1e9 { panic("bad max token size") } if n < len(s.buf) { s.buf = make([]byte, n) } s.maxTokenSize = n } // ErrOrEOF is like Err, but returns EOF. Used to test a corner case. func (s *Scanner) ErrOrEOF() error { return s.err
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Nov 02 17:17:44 UTC 2017 - 597 bytes - Viewed (0) -
src/bufio/scan.go
const maxInt = int(^uint(0) >> 1) if len(s.buf) >= s.maxTokenSize || len(s.buf) > maxInt/2 { s.setErr(ErrTooLong) return false } newSize := len(s.buf) * 2 if newSize == 0 { newSize = startBufSize } newSize = min(newSize, s.maxTokenSize) newBuf := make([]byte, newSize) copy(newBuf, s.buf[s.start:s.end]) s.buf = newBuf
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Oct 23 09:06:30 UTC 2023 - 14.2K bytes - Viewed (0) -
src/bufio/scan_test.go
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 22 16:22:42 UTC 2023 - 14.3K bytes - Viewed (0)