Skip to content

Commit c134ce2

Browse files
committed
bytes: fix description of FieldsFunc
Similar to CL 3814041 that fixed the same issue in strings. Fixes #6941. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/41490045
1 parent d270e6f commit c134ce2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pkg/bytes/bytes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ func Fields(s []byte) [][]byte {
265265

266266
// FieldsFunc interprets s as a sequence of UTF-8-encoded Unicode code points.
267267
// 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.
268+
// returns a slice of subslices of s. If all code points in s satisfy f(c), or
269+
// len(s) == 0, an empty slice is returned.
270270
func FieldsFunc(s []byte, f func(rune) bool) [][]byte {
271271
n := 0
272272
inField := false

0 commit comments

Comments
 (0)