diff options
author | Ian Lance Taylor <iant@golang.org> | 2022-02-18 13:10:34 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2022-02-18 13:12:08 -0800 |
commit | 20a33efdf32bf0aedcb0c9813ddc7572bb1ab8c7 (patch) | |
tree | 94aec72c2092a11fa49f0b45da8e036f13416209 /libgo/go/bytes | |
parent | 1931cbad498e625b1e24452dcfffe02539b12224 (diff) | |
download | gcc-20a33efdf32bf0aedcb0c9813ddc7572bb1ab8c7.zip gcc-20a33efdf32bf0aedcb0c9813ddc7572bb1ab8c7.tar.gz gcc-20a33efdf32bf0aedcb0c9813ddc7572bb1ab8c7.tar.bz2 |
libgo: update to Go1.18rc1 release
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/386594
Diffstat (limited to 'libgo/go/bytes')
-rw-r--r-- | libgo/go/bytes/bytes.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libgo/go/bytes/bytes.go b/libgo/go/bytes/bytes.go index 6fdaa49..41323ad 100644 --- a/libgo/go/bytes/bytes.go +++ b/libgo/go/bytes/bytes.go @@ -372,6 +372,8 @@ func genSplit(s, sep []byte, sepSave, n int) [][]byte { // n > 0: at most n subslices; the last subslice will be the unsplit remainder. // n == 0: the result is nil (zero subslices) // n < 0: all subslices +// +// To split around the first instance of a separator, see Cut. func SplitN(s, sep []byte, n int) [][]byte { return genSplit(s, sep, 0, n) } // SplitAfterN slices s into subslices after each instance of sep and @@ -389,6 +391,8 @@ func SplitAfterN(s, sep []byte, n int) [][]byte { // the subslices between those separators. // If sep is empty, Split splits after each UTF-8 sequence. // It is equivalent to SplitN with a count of -1. +// +// To split around the first instance of a separator, see Cut. func Split(s, sep []byte) [][]byte { return genSplit(s, sep, 0, -1) } // SplitAfter slices s into all subslices after each instance of sep and |