mirror of
https://github.com/golang/go
synced 2024-11-23 14:26:17 +00:00
9becf401de
Fixes #61901. Change-Id: I4db21c91fd21079f2aa3bc81fb03dd6f40423a38 GitHub-Last-Rev: ed3df560a40ea10cdcb8ad476ba6849463f3c761 GitHub-Pull-Request: golang/go#67543 Reviewed-on: https://go-review.googlesource.com/c/go/+/587095 Auto-Submit: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
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).