Skip to content
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

Remove char::to_titlecase? #26555

Closed
brson opened this Issue Jun 24, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@brson
Copy link
Contributor

brson commented Jun 24, 2015

Converting a string to titlecase requires a word-breaking algorithm, which std does not provide. We do have the method for converting a single char to titlecase, if one can identify the first char of a word. This method requires a few kb of lookup tables.

We might want to consider whether its wise to ship one without the other. This is marked for stabilization in 1.2 so we need to decide soon.

cc @SimonSapin @alexcrichton @aturon

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jun 24, 2015

This is marked for stabilization in 1.2 so we need to decide soon.

The method is marked as unstable so I'm fine just deleting it, I don't think it's marked to be stable.

@bors bors closed this in 32b7b50 Jun 25, 2015

@brson brson removed the I-needs-decision label Jul 7, 2015

jroesch added a commit to jroesch/rust that referenced this issue Jul 21, 2015

Remove char::to_titlecase. Fix rust-lang#26555
I added it because it was easy (same a `char::to_lowercase`,
just a different table), but it doesn’t make sense to have this
in std but not str::to_titlecase, which would require
https://github.com/unicode-rs/unicode-segmentation

At some point in the future this feature will be available
(both on char and str) in a crates.io crate.

thepowersgang added a commit to thepowersgang/rust that referenced this issue Jul 25, 2015

Remove char::to_titlecase. Fix rust-lang#26555
I added it because it was easy (same a `char::to_lowercase`,
just a different table), but it doesn’t make sense to have this
in std but not str::to_titlecase, which would require
https://github.com/unicode-rs/unicode-segmentation

At some point in the future this feature will be available
(both on char and str) in a crates.io crate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.