We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A fn in Chars<'a> that skips until it finds a specific char and returns the &'a str while it was skipping.
For example:
"I like bananas" ^ Chars is here
let subslice = my_chars.take_str(' '); assert_eq(subslice, "like"); "I like bananas" ^ Chars is here
There's currently no ergonomic way of doing this, it's possible but not something that feels supported.
While iterating over chars it's not the most ergonomic thing to find individual words, or to get subslices.
fn take_str(&mut self) -> &str
The text was updated successfully, but these errors were encountered:
Please fill out the motivation section more. I would like to see a real example of its use.
It also looks like your prose description of its behavior doesn't match the behavior shown in your code snippet.
Sorry, something went wrong.
No branches or pull requests
Proposal
A fn in Chars<'a> that skips until it finds a specific char and returns the &'a str while it was skipping.
For example:
Problem statement
There's currently no ergonomic way of doing this, it's possible but not something that feels supported.
Motivating examples or use cases
While iterating over chars it's not the most ergonomic thing to find individual words, or to get subslices.
Solution sketch
The text was updated successfully, but these errors were encountered: