mirror of https://go.googlesource.com/go
580 B
580 B
The [strings] package adds several functions that work with iterators:
- [Lines] returns an iterator over the newline-terminated lines in the string s.
- [SplitSeq] returns an iterator over all substrings of s separated by sep.
- [SplitAfterSeq] returns an iterator over substrings of s split after each instance of sep.
- [FieldsSeq] returns an iterator over substrings of s split around runs of whitespace characters, as defined by unicode.IsSpace.
- [FieldsFuncSeq] returns an iterator over substrings of s split around runs of Unicode code points satisfying f(c).