- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
split has the following to say regarding the types that the parameter Pattern can have:
The pattern can be a
&str, [char], or a closure that determines the split.
However, another, undocumented, option is that the pattern can also be [&str] and then each split uses the next item from the slice. This is an awesome feature that is kinda difficult to figure out.
For reference:
https://news.ycombinator.com/item?id=19080404
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.