- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 287 for runes (0.05 sec)
-
src/bufio/scan.go
// UTF-8-encoded rune as a token. The sequence of runes returned is // equivalent to that from a range loop over the input as a string, which // means that erroneous UTF-8 encodings translate to U+FFFD = "\xef\xbf\xbd". // Because of the Scan interface, this makes it impossible for the client to // distinguish correctly encoded replacement runes from encoding errors.
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
} } } // Test that the rune splitter returns same sequence of runes (not bytes) as for range string. func TestScanRune(t *testing.T) { for n, test := range scanTests { buf := strings.NewReader(test) s := NewScanner(buf) s.Split(ScanRunes) var i, runeCount int var expect rune // Use a string range loop to validate the sequence of runes. for i, expect = range test { if !s.Scan() {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 22 16:22:42 UTC 2023 - 14.3K bytes - Viewed (0) -
src/bytes/bytes.go
// returning nil instead of empty slice if all spaces. return nil } return s[start:stop] } // Runes interprets s as a sequence of UTF-8-encoded code points. // It returns a slice of runes (Unicode code points) equivalent to s. func Runes(s []byte) []rune { t := make([]rune, utf8.RuneCount(s)) i := 0 for len(s) > 0 { r, l := utf8.DecodeRune(s) t[i] = r i++ s = s[l:] }
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/bytes/example_test.go
fmt.Println(bytes.LastIndexFunc([]byte("go gopher!"), unicode.IsNumber)) // Output: // 8 // 9 // -1 } func ExampleMap() { rot13 := func(r rune) rune { switch { case r >= 'A' && r <= 'Z': return 'A' + (r-'A'+13)%26 case r >= 'a' && r <= 'z': return 'a' + (r-'a'+13)%26 } return r }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0) -
src/bytes/buffer.go
// included to match [bufio.Writer]'s WriteRune. The buffer is grown as needed; // if it becomes too large, WriteRune will panic with [ErrTooLarge]. func (b *Buffer) WriteRune(r rune) (n int, err error) { // 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 {
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/bytes/buffer_test.go
} } } func TestWriteInvalidRune(t *testing.T) { // Invalid runes, including negative ones, should be written as // utf8.RuneError. for _, r := range []rune{-1, utf8.MaxRune + 1} { var buf Buffer buf.WriteRune(r) check(t, fmt.Sprintf("TestWriteInvalidRune (%d)", r), &buf, "\uFFFD") } }
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/bufio/bufio.go
b.lastRuneSize = -1 return nil } // ReadRune reads a single UTF-8 encoded Unicode character and returns the // rune and its size in bytes. If the encoded rune is invalid, it consumes one byte // and returns unicode.ReplacementChar (U+FFFD) with a size of 1. func (b *Reader) ReadRune() (r rune, size int, err error) { for b.r+utf8.UTFMax > b.w && !utf8.FullRune(b.buf[b.r:b.w]) && b.err == nil && b.w-b.r < len(b.buf) {
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/archive/zip/reader.go
switch { case !utf8Valid1 || !utf8Valid2: // Name and Comment definitely not UTF-8. f.NonUTF8 = true case !utf8Require1 && !utf8Require2: // Name and Comment use only single-byte runes that overlap with UTF-8. f.NonUTF8 = false default: // Might be UTF-8, might be some other encoding; preserve existing flag. // Some ZIP writers use UTF-8 encoding without setting the UTF-8 flag.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Sat Aug 03 01:05:29 UTC 2024 - 28.1K bytes - Viewed (0) -
.github/workflows/build.yml
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Aug 17 10:05:29 UTC 2024 - 17.2K bytes - Viewed (0) -
cni/README.md
- and the other end is in ztunnel's pod and setting up iptables rules to funnel traffic thru that socket "tube" to ztunnel and back. This effectively behaves like ztunnel is an in-pod sidecar, without actually requiring the injection of ztunnel as a sidecar into the pod manifest, or mutatating the application pod in any way.
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Jul 17 23:10:17 UTC 2024 - 10.5K bytes - Viewed (0)