mojo
mojo copied to clipboard
[Feature Request] [stdlib] Make `String`'s `split` method accept `None` as the separator
Review Mojo's priorities
- [X] I have read the roadmap and priorities and I believe this request falls within the priorities.
What is your request?
Currently, String
's split
method does not support None
as the separator to split on. In Python it's fully possible to perform splits such as some_string.split(None)
and some_string.split(None, maxsplit=1)
and some_string.split(None, 2)
. This is the same as not providing any sep
at all.
What is your motivation for this change?
Python interoperability
Any other details?
No response