Skip to content

Add examples for edge cases of str.split/str.splitn #14335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2014

Conversation

tbu-
Copy link
Contributor

@tbu- tbu- commented May 21, 2014

In particular, show examples for splitting the empty string and using splitn
with a count of 0.

Fix #14222.

In particular, show examples for splitting the empty string and using `splitn`
with a count of 0.

Fix rust-lang#14222.
@alexcrichton
Copy link
Member

@pnkfelix, you may want to take a look at this to ensure that you're satisfied with the number of documented variations.

@pnkfelix
Copy link
Member

Yeah these examples are sufficient, I think someone who cares should be able to derive the right interpretation from the corner-cases shown here.

bors added a commit that referenced this pull request May 22, 2014
In particular, show examples for splitting the empty string and using `splitn`
with a count of 0.

Fix #14222.
@bors bors closed this May 22, 2014
@bors bors merged commit dcc2305 into rust-lang:master May 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

str::split and str::splitn doc unclear as to how empty string input is handled
4 participants