]> Cypherpunks repositories - gostls13.git/commitdiff
strings: fix description of FieldsFunc
authorRoger Peppe <rogpeppe@gmail.com>
Wed, 5 Jan 2011 00:23:29 +0000 (16:23 -0800)
committerRob Pike <r@golang.org>
Wed, 5 Jan 2011 00:23:29 +0000 (16:23 -0800)
R=r
CC=golang-dev
https://golang.org/cl/3814041

src/pkg/strings/strings.go

index d8c695226d0cc01986d132708e27ea3167705664..98a0d5731ec3d9f547e1f8e7e6206baa990fa718 100644 (file)
@@ -215,8 +215,8 @@ func Fields(s string) []string {
 }
 
 // FieldsFunc splits the string s at each run of Unicode code points c satisfying f(c)
-// and returns an array of slices of s. If no code points in s satisfy f(c), an empty slice
-// is returned.
+// and returns an array of slices of s. If all code points in s satisfy f(c) or the
+// string is empty, an empty slice is returned.
 func FieldsFunc(s string, f func(int) bool) []string {
        // First count the fields.
        n := 0