Expand description
Case mapping for Unicode characters and strings.
This module is published as its own crate (icu_casemap
)
and as part of the icu
crate. See the latter for more details on the ICU4X project.
§Examples
use icu::casemap::CaseMapper;
use icu::locale::langid;
let cm = CaseMapper::new();
assert_eq!(
cm.uppercase_to_string("hello world", &langid!("und")),
"HELLO WORLD"
);
assert_eq!(
cm.lowercase_to_string("Γειά σου Κόσμε", &langid!("und")),
"γειά σου κόσμε"
);
Modules§
- 🚧 [Unstable] Data provider struct definitions for this ICU4X component.
- Titlecasing-specific try_new_with_mapper_unstable
Structs§
- A wrapper around
CaseMapper
that can produce case mapping closures over a character or string. This wrapper can be constructed directly, or by wrapping a reference to an existingCaseMapper
. - A struct with the ability to convert characters and strings to uppercase or lowercase, or fold them to a normalized form for case-insensitive comparison.
- A wrapper around
CaseMapper
that can compute titlecasing stuff, and is able to load additional data to support the non-legacy “head adjustment” behavior.
Traits§
- An object that accepts characters and/or strings to be used with
CaseMapCloser::add_string_case_closure_to()
andCaseMapCloser::add_case_closure_to()
.