From: Shenghou Ma Date: Fri, 13 Dec 2013 03:13:19 +0000 (-0500) Subject: bytes: fix description of FieldsFunc X-Git-Tag: go1.3beta1~1239 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c134ce272f5e1170908771f8371f5f8c01caf37c;p=gostls13.git 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 --- 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