- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for UTFMax (0.07 sec)
-
internal/s3select/jstream/scratch.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 758 bytes - Viewed (0) -
src/bufio/export_test.go
package bufio // Exported for testing only. 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.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Nov 02 17:17:44 UTC 2017 - 597 bytes - Viewed (0) -
src/bytes/buffer_test.go
}) if n > 0 { t.Errorf("allocations occurred while appending") } } func TestRuneIO(t *testing.T) { const NRune = 1000 // Built a test slice while we write the data b := make([]byte, utf8.UTFMax*NRune) var buf Buffer n := 0 for r := rune(0); r < NRune; r++ { size := utf8.EncodeRune(b[n:], r) nbytes, err := buf.WriteRune(r) if err != nil { t.Fatalf("WriteRune(%U) error: %s", r, err) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0) -
src/bytes/buffer.go
// Compare as uint32 to correctly handle negative runes. if uint32(r) < utf8.RuneSelf { b.WriteByte(byte(r)) return 1, nil } b.lastRead = opInvalid m, ok := b.tryGrowByReslice(utf8.UTFMax) if !ok { m = b.grow(utf8.UTFMax) } b.buf = utf8.AppendRune(b.buf[:m], r) return len(b.buf) - m, nil } // Read reads the next len(p) bytes from the buffer or until the buffer
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Oct 29 16:47:05 UTC 2024 - 15.7K bytes - Viewed (0) -
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 Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0) -
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 Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 35.6K bytes - Viewed (0) -
src/bufio/bufio_test.go
} } func TestReadWriteRune(t *testing.T) { const NRune = 1000 byteBuf := new(bytes.Buffer) w := NewWriter(byteBuf) // Write the runes out using WriteRune buf := make([]byte, utf8.UTFMax) for r := rune(0); r < NRune; r++ { size := utf8.EncodeRune(buf, r) nbytes, err := w.WriteRune(r) if err != nil { t.Fatalf("WriteRune(0x%x) error: %s", r, err) } if nbytes != size {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0) -
api/go1.txt
pkg unicode/utf16, func IsSurrogate(int32) bool pkg unicode/utf8, const MaxRune ideal-char pkg unicode/utf8, const RuneError ideal-char pkg unicode/utf8, const RuneSelf ideal-int pkg unicode/utf8, const UTFMax ideal-int pkg unicode/utf8, func DecodeLastRune([]uint8) (int32, int) pkg unicode/utf8, func DecodeLastRuneInString(string) (int32, int) pkg unicode/utf8, func DecodeRune([]uint8) (int32, int)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 14 18:58:28 UTC 2013 - 1.7M bytes - Viewed (0) -
api/go1.1.txt
pkg unicode, var Takri *RangeTable pkg unicode/utf8, const MaxRune = 1114111 pkg unicode/utf8, const RuneError = 65533 pkg unicode/utf8, const RuneSelf = 128 pkg unicode/utf8, const UTFMax = 4
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Mar 31 20:37:15 UTC 2022 - 2.6M bytes - Viewed (0)