From 2f5a5be237d8e115188398c30545a0e593269928 Mon Sep 17 00:00:00 2001 From: Roger Peppe Date: Tue, 4 Jan 2011 16:23:29 -0800 Subject: [PATCH] strings: fix description of FieldsFunc R=r CC=golang-dev https://golang.org/cl/3814041 --- src/pkg/strings/strings.go | 4 ++-- 1 file 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 -- 2.48.1