We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d270e6f commit c134ce2Copy full SHA for c134ce2
src/pkg/bytes/bytes.go
@@ -265,8 +265,8 @@ func Fields(s []byte) [][]byte {
265
266
// FieldsFunc interprets s as a sequence of UTF-8-encoded Unicode code points.
267
// It splits the slice s at each run of code points c satisfying f(c) and
268
-// returns a slice of subslices of s. If no code points in s satisfy f(c), an
269
-// empty slice is returned.
+// returns a slice of subslices of s. If all code points in s satisfy f(c), or
+// len(s) == 0, an empty slice is returned.
270
func FieldsFunc(s []byte, f func(rune) bool) [][]byte {
271
n := 0
272
inField := false
0 commit comments