-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Should std::str::CharRange
be public?
#9387
Comments
Encoding support doesn't change that str is using |
Nominating for 1.0-beta P-backcompat-libs: we need to finalize the story around these methods. |
1.0 beta, P-backcompat-libs, I-needs-decision. |
This struct and the associated functions `char_range_at` and `char_range_at_reverse` have been unstable for some time now, and it looks like with a combination of `char_at` plus `char_at_reverse` plus `len_utf8` that the structure isn't necessary at this time. The structure and perhaps more fanciful unicode processing support could be added at a later date, but for now the types are being deprecated and slated for removal. Any code currently using `CharRange` can instead use the `char_at` and `char_at_reverse` methods plus the `len_utf8` method on `char` as a replacement. Closes rust-lang#9387 [breaking-change]
This is now explicitly behind its own feature gate so I'm going to de-milestone this issue as we will probably not stabilize it for 1.0 at this rate. |
Closing in favour of the tracking issue for the feature gate: #27754. |
Currenty, str exports both
CharRange
and methods for getting anCharRange
at an specific byte index of the string.However, with Iterators we might not really need those to be public, and if we get an encoding module they might have to migrate to there anyway, as they are specific to the utf8 representation of a string.
The text was updated successfully, but these errors were encountered: