- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for DecodeRune (0.04 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/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)