icu

Crate 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::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§

  • Options used by types in this crate
  • 🚧 [Unstable] Data provider struct definitions for this ICU4X component.

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 borrowed CaseMapCloser.
  • 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 struct with the ability to convert characters and strings to uppercase or lowercase, or fold them to a normalized form for case-insensitive comparison, borrowed version.
  • A wrapper around CaseMapper that can compute titlecasing stuff, and is able to load additional data to support the non-legacy “head adjustment” behavior.
  • A borrowed TitlecaseMapper.

Traits§