From c134ce272f5e1170908771f8371f5f8c01caf37c Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Thu, 12 Dec 2013 22:13:19 -0500 Subject: [PATCH] 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 --- src/pkg/bytes/bytes.go | 4 ++-- 1 file 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 -- 2.48.1