mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
13 lines
580 B
Markdown
13 lines
580 B
Markdown
|
|
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).
|