aboutsummaryrefslogtreecommitdiff
path: root/src/bytes
diff options
context:
space:
mode:
authorOleksandr Redko <oleksandr.red+github@gmail.com>2024-12-17 19:05:23 +0200
committerGopher Robot <gobot@golang.org>2024-12-17 11:08:32 -0800
commitb057b8872d8297ec9ccbfd9d29dad51dff795846 (patch)
tree00511e1adb5eb5149e974edb299b4a3c7add262b /src/bytes
parente977b83b320b3aedca218566c42ee94c5fad6bb0 (diff)
downloadgo-b057b8872d8297ec9ccbfd9d29dad51dff795846.tar.xz
bytes, strings: add cross-references in docstrings
For newly funcs SplitSeq, SplitAfterSeq, FieldsSeq, FieldsFuncSeq. Updates #61901. Change-Id: I3c97bfd9c2250de68aaea348c82a05635ee797af Reviewed-on: https://go-review.googlesource.com/c/go/+/637176 Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/bytes')
-rw-r--r--src/bytes/iter.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bytes/iter.go b/src/bytes/iter.go
index 1cf13a94ec..9890a478a8 100644
--- a/src/bytes/iter.go
+++ b/src/bytes/iter.go
@@ -68,7 +68,7 @@ func splitSeq(s, sep []byte, sepSave int) iter.Seq[[]byte] {
}
// SplitSeq returns an iterator over all substrings of s separated by sep.
-// The iterator yields the same strings that would be returned by Split(s, sep),
+// The iterator yields the same strings that would be returned by [Split](s, sep),
// but without constructing the slice.
// It returns a single-use iterator.
func SplitSeq(s, sep []byte) iter.Seq[[]byte] {
@@ -76,7 +76,7 @@ func SplitSeq(s, sep []byte) iter.Seq[[]byte] {
}
// SplitAfterSeq returns an iterator over substrings of s split after each instance of sep.
-// The iterator yields the same strings that would be returned by SplitAfter(s, sep),
+// The iterator yields the same strings that would be returned by [SplitAfter](s, sep),
// but without constructing the slice.
// It returns a single-use iterator.
func SplitAfterSeq(s, sep []byte) iter.Seq[[]byte] {
@@ -84,8 +84,8 @@ func SplitAfterSeq(s, sep []byte) iter.Seq[[]byte] {
}
// FieldsSeq returns an iterator over substrings of s split around runs of
-// whitespace characters, as defined by unicode.IsSpace.
-// The iterator yields the same strings that would be returned by Fields(s),
+// whitespace characters, as defined by [unicode.IsSpace].
+// The iterator yields the same strings that would be returned by [Fields](s),
// but without constructing the slice.
func FieldsSeq(s []byte) iter.Seq[[]byte] {
return func(yield func([]byte) bool) {
@@ -118,7 +118,7 @@ func FieldsSeq(s []byte) iter.Seq[[]byte] {
// FieldsFuncSeq returns an iterator over substrings of s split around runs of
// Unicode code points satisfying f(c).
-// The iterator yields the same strings that would be returned by FieldsFunc(s),
+// The iterator yields the same strings that would be returned by [FieldsFunc](s),
// but without constructing the slice.
func FieldsFuncSeq(s []byte, f func(rune) bool) iter.Seq[[]byte] {
return func(yield func([]byte) bool) {