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.


use icu_casemap::CaseMapper;
use icu_locid::langid;

let cm = CaseMapper::new();

    cm.uppercase_to_string("hello world", &langid!("und")),
    cm.lowercase_to_string("Γειά σου Κόσμε", &langid!("und")),
    "γειά σου κόσμε"


  • 🚧 [Unstable] Data provider struct definitions for this ICU4X component.
  • Titlecasing-specific try_new_with_mapper_unstable


  • 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.
  • A wrapper around CaseMapper that can compute titlecasing stuff, and is able to load additional data to support the non-legacy “head adjustment” behavior.