Repository navigation
Stabilize char::is_case_ignorable, char::is_cased, and the titlecase feature - #165434
Conversation
|
r? @maxdexh rustbot has assigned @maxdexh. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
My main concern is offering these as aggregate tables without adding the necessary simpler tables we need for this. For example, I think the aggregate method is good since it can use a simpler lookup. I just don't like the fact that we'd be offering |
|
We used to have a dedicated table for If you want me to propose |
|
I would recommend including |
char::is_case_ignorable and char::is_casedchar::is_case_ignorable, char::is_cased, and the titlecase feature
This comment has been minimized.
This comment has been minimized.
Except `char::case` and `CharCase`.
eedcbcb to
e907177
Compare
|
@rfcbot merge libs |
|
@clarfonthey has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/libs-ping: FCP proposed for libs, please feel free to register concerns. |
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
|
Potential late concern: does It could be nicer to have an API like |
|
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. |
|
Reminder, once the PR becomes ready for a review, use |
|
@rustbot ready |
…uwer Rollup of 4 pull requests Successful merges: - #165720 (windows: remove redundant prefix parsing in `PathBuf::_push`) - #166243 (Avoid terminator: None in check_enums in `split_block`) - #165434 (Stabilize `char::is_case_ignorable`, `char::is_cased`, and the `titlecase` feature) - #166144 (Rc/Arc::ptr_eq ignore the metadata of all wide pointers)
Rollup merge of #165434 - Jules-Bertholet:case-stabilizations, r=maxdexh Stabilize `char::is_case_ignorable`, `char::is_cased`, and the `titlecase` feature `is_case_ignorable()` is tracked in #154848, while `is_cased()` and `titlecase` are from #153892. `char::case()` and `char::CharCase` are excluded. ## API summary ```rust // core impl char { pub fn is_cased(self) -> bool; pub fn is_case_ignorable(self) -> bool; pub fn is_titlecase(self) -> bool; pub fn to_titlecase(self) -> ToTitlecase; } mod char { struct ToTitlecase { ... } impl Iterator for ToTitlecase { ... } impl DoubleEndedIterator for ToTitlecase { ... } impl FusedIterator for ToTitlecase { } impl ExactSizeIterator for ToTitlecase { ... } impl fmt::Display for ToTitlecase { ... } } ``` Together, these provide all the Unicode data necessary to implement string lowercasing, as needed by crates like https://github.com/VoidStarKat/widestring-rs. --- Closes #154848 @rustbot label A-Unicode T-libs I-libs-nominated needs-fcp
…uwer Rollup of 4 pull requests Successful merges: - rust-lang/rust#165720 (windows: remove redundant prefix parsing in `PathBuf::_push`) - rust-lang/rust#166243 (Avoid terminator: None in check_enums in `split_block`) - rust-lang/rust#165434 (Stabilize `char::is_case_ignorable`, `char::is_cased`, and the `titlecase` feature) - rust-lang/rust#166144 (Rc/Arc::ptr_eq ignore the metadata of all wide pointers)
…uwer Rollup of 4 pull requests Successful merges: - rust-lang/rust#165720 (windows: remove redundant prefix parsing in `PathBuf::_push`) - rust-lang/rust#166243 (Avoid terminator: None in check_enums in `split_block`) - rust-lang/rust#165434 (Stabilize `char::is_case_ignorable`, `char::is_cased`, and the `titlecase` feature) - rust-lang/rust#166144 (Rc/Arc::ptr_eq ignore the metadata of all wide pointers)
| #[must_use] | ||
| #[unstable(feature = "titlecase", issue = "153892")] | ||
| #[stable(feature = "cased", since = "CURRENT_RUSTC_VERSION")] | ||
| #[inline] | ||
| pub fn is_cased(self) -> bool { |
There was a problem hiding this comment.
Why was a new feature created specifically for this function?
There was a problem hiding this comment.
Arguably it's a bit weird to have a feature at all for some libs APIs, but, 🤷🏻
There was a problem hiding this comment.
I think this is from when I originally intended to stabilize only this method, without the rest of the titlecase feature. I can change it back if you would like
There was a problem hiding this comment.
If it was what the method had before it should be kept so that people know it was stabilised.
…dexh Correct feature name for `is_cased()` method I accidentally changed it when stabilizing: rust-lang#165434 (comment)
…dexh Correct feature name for `is_cased()` method I accidentally changed it when stabilizing: rust-lang#165434 (comment)
Rollup merge of #166623 - Jules-Bertholet:fix-feature, r=maxdexh Correct feature name for `is_cased()` method I accidentally changed it when stabilizing: #165434 (comment)
View all comments
is_case_ignorable()is tracked in #154848, whileis_cased()andtitlecaseare from #153892.char::case()andchar::CharCaseare excluded.API summary
Together, these provide all the Unicode data necessary to implement string lowercasing, as needed by crates like https://github.com/VoidStarKat/widestring-rs.
Closes #154848
@rustbot label A-Unicode T-libs I-libs-nominated needs-fcp