aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/strings/strings.go
diff options
context:
space:
mode:
authorRoger Peppe <rogpeppe@gmail.com>2011-01-04 16:23:29 -0800
committerRob Pike <r@golang.org>2011-01-04 16:23:29 -0800
commit2f5a5be237d8e115188398c30545a0e593269928 (patch)
treec76e1f6c01cf90de87719a1683f7d041c25992d3 /src/pkg/strings/strings.go
parent8184778abf3d60fd436541368077a08f3b4287b9 (diff)
downloadgo-2f5a5be237d8e115188398c30545a0e593269928.tar.xz
strings: fix description of FieldsFunc
R=r CC=golang-dev https://golang.org/cl/3814041
Diffstat (limited to 'src/pkg/strings/strings.go')
-rw-r--r--src/pkg/strings/strings.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/strings/strings.go b/src/pkg/strings/strings.go
index d8c695226d..98a0d5731e 100644
--- a/src/pkg/strings/strings.go
+++ b/src/pkg/strings/strings.go
@@ -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