-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Add as_str
method for str::Split(Whitespace)
#43090
Comments
#34204 has a previous attempt and some discussion |
Meanwhile, I implemented an alternative |
I would be open to adding this for str's split iterators, as long as it does not require all |
Do I understand correctly that it's impossible just for reverse iterator? In other words, implementing this for forward iterator should be fine, right? If yes, then maybe we could implement just that, as I expect that case to be most common, so it's already useful. I'm willing to do PR. |
Split now has it thanks to #75265, but SplitWhitespace still doesn't, so I'm not closing this issue yet. |
Consider the following use case:
Some iterators, like
str::Chars
already have anas_str
method. The only question is whether it is possible to implementas_str
for the Split API, without making any breaking changes.The text was updated successfully, but these errors were encountered: