mojo icon indicating copy to clipboard operation
mojo copied to clipboard

[Feature Request] [stdlib] Make `String`'s `split` method accept `None` as the separator

Open siitron opened this issue 8 months ago • 3 comments

Review Mojo's 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

siitron avatar May 29 '24 18:05 siitron