aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/bytes/bytes.go
diff options
context:
space:
mode:
authorShenghou Ma <minux.ma@gmail.com>2013-12-12 22:13:19 -0500
committerShenghou Ma <minux.ma@gmail.com>2013-12-12 22:13:19 -0500
commitc134ce272f5e1170908771f8371f5f8c01caf37c (patch)
treee0dca59a5fc6c917b4bb2f11d676cea79e0b20d6 /src/pkg/bytes/bytes.go
parentd270e6f28c803cc9fb53f5adc2b935f73b146f86 (diff)
downloadgo-c134ce272f5e1170908771f8371f5f8c01caf37c.tar.xz
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
Diffstat (limited to 'src/pkg/bytes/bytes.go')
-rw-r--r--src/pkg/bytes/bytes.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/bytes/bytes.go b/src/pkg/bytes/bytes.go
index 01a5d9ae4e..644bf75b89 100644
--- a/src/pkg/bytes/bytes.go
+++ b/src/pkg/bytes/bytes.go
@@ -265,8 +265,8 @@ func Fields(s []byte) [][]byte {
// FieldsFunc interprets s as a sequence of UTF-8-encoded Unicode code points.
// It splits the slice s at each run of code points c satisfying f(c) and
-// returns a slice of subslices of s. If no code points in s satisfy f(c), an
-// 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.
func FieldsFunc(s []byte, f func(rune) bool) [][]byte {
n := 0
inField := false