- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for asciiSpace (0.19 sec)
-
src/bytes/bytes.go
fieldStart := 0 i := 0 // Skip spaces in the front of the input. for i < len(s) && asciiSpace[s[i]] != 0 { i++ } fieldStart = i for i < len(s) { if asciiSpace[s[i]] == 0 { i++ continue } a[na] = s[fieldStart:i:i] na++ i++ // Skip spaces in between fields. for i < len(s) && asciiSpace[s[i]] != 0 { i++ } fieldStart = i }
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/iter.go
// but without constructing the slice. func FieldsSeq(s []byte) iter.Seq[[]byte] { return func(yield func([]byte) bool) { start := -1 for i := 0; i < len(s); { size := 1 r := rune(s[i]) isSpace := asciiSpace[s[i]] != 0 if r >= utf8.RuneSelf { r, size = utf8.DecodeRune(s[i:]) isSpace = unicode.IsSpace(r) } if isSpace { if start >= 0 { if !yield(s[start:i:i]) { return }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 14 18:23:13 UTC 2024 - 3.7K bytes - Viewed (0)