Crate icu_casemap

source ·
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::locid::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")),
    "γειά σου κόσμε"
);

Re-exports§

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 existing CaseMapper.
  • 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.

Traits§