- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for DecodeRune (0.07 sec)
-
src/bytes/iter.go
// bytes of sep to include in the results (none or all). func splitSeq(s, sep []byte, sepSave int) iter.Seq[[]byte] { return func(yield func([]byte) bool) { if len(sep) == 0 { for len(s) > 0 { _, size := utf8.DecodeRune(s) if !yield(s[:size:size]) { return } s = s[size:] } return } for { i := Index(s, sep) if i < 0 { break } frag := s[:i+sepSave]
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Wed Sep 03 14:04:47 UTC 2025 - 3.6K bytes - Viewed (0) -
src/bytes/bytes.go
return len(s) == len(t) hasUnicode: s = s[i:] t = t[i:] for len(s) != 0 && len(t) != 0 { // Extract first rune from each. sr, size := utf8.DecodeRune(s) s = s[size:] tr, size := utf8.DecodeRune(t) t = t[size:] // If they match, keep going; if not, return false. // Easy case. if tr == sr { continue }
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Wed Sep 03 14:04:47 UTC 2025 - 35.5K bytes - Viewed (0) -
src/bufio/scan.go
start := 0 for width := 0; start < len(data); start += width { var r rune r, width = utf8.DecodeRune(data[start:]) if !isSpace(r) { break } } // Scan until space, marking end of word. for width, i := 0, start; i < len(data); i += width { var r rune r, width = utf8.DecodeRune(data[i:]) if isSpace(r) { return i + width, data[start:i], nil } }
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Wed May 21 18:05:26 UTC 2025 - 14.2K bytes - Viewed (0) -
src/bytes/buffer.go
b.Reset() return 0, 0, io.EOF } c := b.buf[b.off] if c < utf8.RuneSelf { b.off++ b.lastRead = opReadRune1 return rune(c), 1, nil } r, n := utf8.DecodeRune(b.buf[b.off:]) b.off += n b.lastRead = readOp(n) return r, n, nil } // UnreadRune unreads the last rune returned by [Buffer.ReadRune]. // If the most recent read or write operation on the buffer was
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Mon May 19 17:38:56 UTC 2025 - 16K bytes - Viewed (0) -
src/bufio/bufio.go
b.fill() // b.w-b.r < len(buf) => buffer is not full } b.lastRuneSize = -1 if b.r == b.w { return 0, 0, b.readErr() } r, size = utf8.DecodeRune(b.buf[b.r:b.w]) b.r += size b.lastByte = int(b.buf[b.r-1]) b.lastRuneSize = size return r, size, nil } // UnreadRune unreads the last rune. If the most recent method called on
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Wed Sep 03 14:04:47 UTC 2025 - 22K bytes - Viewed (0) -
src/bytes/bytes_test.go
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Mon Jul 28 18:13:58 UTC 2025 - 62.9K bytes - Viewed (0)