@@ -67,26 +67,26 @@ func splitSeq(s, sep []byte, sepSave int) iter.Seq[[]byte] {
67
67
}
68
68
}
69
69
70
- // SplitSeq returns an iterator over all substrings of s separated by sep.
71
- // The iterator yields the same strings that would be returned by [Split](s, sep),
72
- // but without constructing the slice.
70
+ // SplitSeq returns an iterator over all subslices of s separated by sep.
71
+ // The iterator yields the same subslices that would be returned by [Split](s, sep),
72
+ // but without constructing a new slice containing the subslices .
73
73
// It returns a single-use iterator.
74
74
func SplitSeq (s , sep []byte ) iter.Seq [[]byte ] {
75
75
return splitSeq (s , sep , 0 )
76
76
}
77
77
78
- // SplitAfterSeq returns an iterator over substrings of s split after each instance of sep.
79
- // The iterator yields the same strings that would be returned by [SplitAfter](s, sep),
80
- // but without constructing the slice.
78
+ // SplitAfterSeq returns an iterator over subslices of s split after each instance of sep.
79
+ // The iterator yields the same subslices that would be returned by [SplitAfter](s, sep),
80
+ // but without constructing a new slice containing the subslices .
81
81
// It returns a single-use iterator.
82
82
func SplitAfterSeq (s , sep []byte ) iter.Seq [[]byte ] {
83
83
return splitSeq (s , sep , len (sep ))
84
84
}
85
85
86
- // FieldsSeq returns an iterator over substrings of s split around runs of
86
+ // FieldsSeq returns an iterator over subslices of s split around runs of
87
87
// whitespace characters, as defined by [unicode.IsSpace].
88
- // The iterator yields the same strings that would be returned by [Fields](s),
89
- // but without constructing the slice.
88
+ // The iterator yields the same subslices that would be returned by [Fields](s),
89
+ // but without constructing a new slice containing the subslices .
90
90
func FieldsSeq (s []byte ) iter.Seq [[]byte ] {
91
91
return func (yield func ([]byte ) bool ) {
92
92
start := - 1
@@ -116,10 +116,10 @@ func FieldsSeq(s []byte) iter.Seq[[]byte] {
116
116
}
117
117
}
118
118
119
- // FieldsFuncSeq returns an iterator over substrings of s split around runs of
119
+ // FieldsFuncSeq returns an iterator over subslices of s split around runs of
120
120
// Unicode code points satisfying f(c).
121
- // The iterator yields the same strings that would be returned by [FieldsFunc](s),
122
- // but without constructing the slice.
121
+ // The iterator yields the same subslices that would be returned by [FieldsFunc](s),
122
+ // but without constructing a new slice containing the subslices .
123
123
func FieldsFuncSeq (s []byte , f func (rune ) bool ) iter.Seq [[]byte ] {
124
124
return func (yield func ([]byte ) bool ) {
125
125
start := - 1
0 commit comments