1
0
mirror of https://github.com/golang/go synced 2024-11-19 15:44:44 -07:00

strings: use slice instead of list and array in Fields comment

Change-Id: I70b839ff0ae5f015587390a82616ebb1d657d71a
Reviewed-on: https://go-review.googlesource.com/55490
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Martin Möhrmann 2017-08-14 21:12:49 +02:00
parent 248a7c7c42
commit d180d18666

View File

@ -310,8 +310,8 @@ func SplitAfter(s, sep string) []string {
var asciiSpace = [256]uint8{'\t': 1, '\n': 1, '\v': 1, '\f': 1, '\r': 1, ' ': 1}
// Fields splits the string s around each instance of one or more consecutive white space
// characters, as defined by unicode.IsSpace, returning an array of substrings of s or an
// empty list if s contains only white space.
// characters, as defined by unicode.IsSpace, returning a slice of substrings of s or an
// empty slice if s contains only white space.
func Fields(s string) []string {
// First count the fields.
// This is an exact count if s is ASCII, otherwise it is an approximation.