From 6dd7462a04e2ce0a3e91cdb8fd85e98ac62ba0aa Mon Sep 17 00:00:00 2001 From: cui fliter Date: Thu, 12 Oct 2023 11:49:26 +0800 Subject: bytes,strings: add available godoc link Change-Id: Id9706a783d3321e3706eeee102286522e7968efd Reviewed-on: https://go-review.googlesource.com/c/go/+/534775 Reviewed-by: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov Auto-Submit: Ian Lance Taylor --- src/strings/strings.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/strings/strings.go') 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 -- cgit v1.3