@@ -121,7 +121,7 @@ func IndexByte(s string, c byte) int {
121
121
122
122
// IndexRune returns the index of the first instance of the Unicode code point
123
123
// r, or -1 if rune is not present in s.
124
- // If r is utf8.RuneError, it returns the first instance of any
124
+ // If r is [ utf8.RuneError] , it returns the first instance of any
125
125
// invalid UTF-8 byte sequence.
126
126
func IndexRune (s string , r rune ) int {
127
127
switch {
@@ -275,7 +275,7 @@ func genSplit(s, sep string, sepSave, n int) []string {
275
275
// Edge cases for s and sep (for example, empty strings) are handled
276
276
// as described in the documentation for [Split].
277
277
//
278
- // To split around the first instance of a separator, see Cut.
278
+ // To split around the first instance of a separator, see [ Cut] .
279
279
func SplitN (s , sep string , n int ) []string { return genSplit (s , sep , 0 , n ) }
280
280
281
281
// SplitAfterN slices s into substrings after each instance of sep and
@@ -304,7 +304,7 @@ func SplitAfterN(s, sep string, n int) []string {
304
304
//
305
305
// It is equivalent to [SplitN] with a count of -1.
306
306
//
307
- // To split around the first instance of a separator, see Cut.
307
+ // To split around the first instance of a separator, see [ Cut] .
308
308
func Split (s , sep string ) []string { return genSplit (s , sep , 0 , - 1 ) }
309
309
310
310
// SplitAfter slices s into all substrings after each instance of sep and
@@ -324,7 +324,7 @@ func SplitAfter(s, sep string) []string {
324
324
var asciiSpace = [256 ]uint8 {'\t' : 1 , '\n' : 1 , '\v' : 1 , '\f' : 1 , '\r' : 1 , ' ' : 1 }
325
325
326
326
// Fields splits the string s around each instance of one or more consecutive white space
327
- // characters, as defined by unicode.IsSpace, returning a slice of substrings of s or an
327
+ // characters, as defined by [ unicode.IsSpace] , returning a slice of substrings of s or an
328
328
// empty slice if s contains only white space.
329
329
func Fields (s string ) []string {
330
330
// First count the fields.
0 commit comments