Skip to content

Make string split with an empty string consistent with replace#6566

Closed
josevalim wants to merge 1 commit intomasterfrom
jv-string-split
Closed

Make string split with an empty string consistent with replace#6566
josevalim wants to merge 1 commit intomasterfrom
jv-string-split

Conversation

@josevalim
Copy link
Copy Markdown
Member

To go with #6559. /cc @lexmag

@michalmuskala
Copy link
Copy Markdown
Member

How does empty regex compare to empty string after the changes?

@josevalim
Copy link
Copy Markdown
Member Author

@michalmuskala you are correct it is inconsistent with regexes. 😩

@whatyouhide
Copy link
Copy Markdown
Member

What are some good properties we can come up with for String.split?

@josevalim
Copy link
Copy Markdown
Member Author

@whatyouhide I think at this point the inconsistency with regex split, which is pretty much unsolvable, leaves our hands tied, regardless of properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants