Unicode Titlecase
Unicode titlecasing operations for chars. The crate supports has additional functionality to support the TR/AZ locale.
Installation
Add this to your Cargo.toml:
[]
= "1.0.1"
Features/Dependencies
There are no dependencies for this crate. The only feature is "std" which is used to add
std::Display on the iterators. This enables code like
'ffl'.to_titlecase().to_string().
Usage
To turn a char into a its titlecase equivalent [char; 3]array:
use to_titlecase;
assert_eq!;
assert_eq!;
assert_eq!;
Or use the iterator version that follows the same format as the std library. The crate defines
a Trait that is implemented on char:
use TitleCase;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
Locale
The TR and AZ locales have different rules for how to titlecase certain characters.
The to_titlecase functions assume the locale is neither of these locations. For conversions
using TR or AZ locales the following functions are also provided:
use to_titlecase_tr_or_az;
assert_eq!;
And as an iterator:
use TitleCase;
assert_eq!;
License
unicode_titlecase is licensed under the MIT License