Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for UTFMax (0.03 sec)

  1. src/bufio/bufio.go

    		if err != nil {
    			return 0, err
    		}
    		return 1, nil
    	}
    	if b.err != nil {
    		return 0, b.err
    	}
    	n := b.Available()
    	if n < utf8.UTFMax {
    		if b.Flush(); b.err != nil {
    			return 0, b.err
    		}
    		n = b.Available()
    		if n < utf8.UTFMax {
    			// Can only happen if buffer is silly small.
    			return b.WriteString(string(r))
    		}
    	}
    	size = utf8.EncodeRune(b.buf[b.n:], r)
    	b.n += size
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Wed Sep 03 14:04:47 UTC 2025
    - 22K bytes
    - Viewed (0)
  2. src/bytes/bytes.go

    		// Search for rune r using the last byte of its UTF-8 encoded form.
    		// The distribution of the last byte is more uniform compared to the
    		// first byte which has a 78% chance of being [240, 243, 244].
    		var b [utf8.UTFMax]byte
    		n := utf8.EncodeRune(b[:], r)
    		last := n - 1
    		i := last
    		fails := 0
    		for i < len(s) {
    			if s[i] != b[last] {
    				o := IndexByte(s[i+1:], b[last])
    				if o < 0 {
    					return -1
    				}
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Wed Sep 03 14:04:47 UTC 2025
    - 35.5K bytes
    - Viewed (0)
Back to top