diff options
| author | cui fliter <imcusg@gmail.com> | 2023-10-12 11:49:26 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-10-13 17:10:31 +0000 |
| commit | 6dd7462a04e2ce0a3e91cdb8fd85e98ac62ba0aa (patch) | |
| tree | 40cf538d58215087be49a085f550cae7472a817c /src/strings/strings.go | |
| parent | a0da9c00aeb51261b9845a46fbc9878870884ab6 (diff) | |
| download | go-6dd7462a04e2ce0a3e91cdb8fd85e98ac62ba0aa.tar.xz | |
bytes,strings: add available godoc link
Change-Id: Id9706a783d3321e3706eeee102286522e7968efd
Reviewed-on: https://go-review.googlesource.com/c/go/+/534775
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/strings/strings.go')
| -rw-r--r-- | src/strings/strings.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/strings/strings.go b/src/strings/strings.go index ece7237c44..ce79bccf8c 100644 --- a/src/strings/strings.go +++ b/src/strings/strings.go @@ -272,7 +272,7 @@ func genSplit(s, sep string, sepSave, n int) []string { // n < 0: all substrings // // Edge cases for s and sep (for example, empty strings) are handled -// as described in the documentation for Split. +// as described in the documentation for [Split]. // // To split around the first instance of a separator, see Cut. func SplitN(s, sep string, n int) []string { return genSplit(s, sep, 0, n) } @@ -301,7 +301,7 @@ func SplitAfterN(s, sep string, n int) []string { // If sep is empty, Split splits after each UTF-8 sequence. If both s // and sep are empty, Split returns an empty slice. // -// It is equivalent to SplitN with a count of -1. +// 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 string) []string { return genSplit(s, sep, 0, -1) } @@ -315,7 +315,7 @@ func Split(s, sep string) []string { return genSplit(s, sep, 0, -1) } // If sep is empty, SplitAfter splits after each UTF-8 sequence. If // both s and sep are empty, SplitAfter returns an empty slice. // -// It is equivalent to SplitAfterN with a count of -1. +// It is equivalent to [SplitAfterN] with a count of -1. func SplitAfter(s, sep string) []string { return genSplit(s, sep, len(sep), -1) } @@ -904,7 +904,7 @@ func Trim(s, cutset string) string { // TrimLeft returns a slice of the string s with all leading // Unicode code points contained in cutset removed. // -// To remove a prefix, use TrimPrefix instead. +// To remove a prefix, use [TrimPrefix] instead. func TrimLeft(s, cutset string) string { if s == "" || cutset == "" { return s @@ -952,7 +952,7 @@ func trimLeftUnicode(s, cutset string) string { // TrimRight returns a slice of the string s, with all trailing // Unicode code points contained in cutset removed. // -// To remove a suffix, use TrimSuffix instead. +// To remove a suffix, use [TrimSuffix] instead. func TrimRight(s, cutset string) string { if s == "" || cutset == "" { return s |
