pub trait CharExt {
// Required methods
fn is_titlecase(self) -> bool;
fn to_titlecase(self) -> ToTitlecase ⓘ;
}
Required Methods§
Sourcefn is_titlecase(self) -> bool
fn is_titlecase(self) -> bool
Indicates whether a character is titlecased.
‘Titlecase’ is defined in terms of the Unicode General Category ‘Lt’.
Sourcefn to_titlecase(self) -> ToTitlecase ⓘ
fn to_titlecase(self) -> ToTitlecase ⓘ
Converts a character to its titlecase equivalent.
This performs complex unconditional mappings with no tailoring.
See to_uppercase()
for references and more information.
This differs from to_uppercase()
since Unicode contains
digraphs and ligature characters.
For example, U+01F3 “dz” and U+FB01 “fi”
map to U+01F1 “DZ” and U+0046 U+0069 “Fi”, respectively.
§Return value
Returns an iterator which yields the characters corresponding to the titlecase equivalent of the character. If no conversion is possible then an iterator with just the input character is returned.
Note that is_titlecase
will not necessarily return true
for the
yielded characters.