Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for MaxTokenSize (0.06 sec)

  1. 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)
  2. src/bufio/scan_test.go

    		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 Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Sep 22 16:22:42 UTC 2023
    - 14.3K bytes
    - Viewed (0)
Back to top