#icu #cldr #localization #unicode

no-std icu_casemap

Unicode case mapping and folding algorithms

4 stable releases

new 1.4.0 Nov 16, 2023
1.3.2 Oct 3, 2023
1.3.1 Oct 2, 2023
1.3.0 Sep 23, 2023

#33 in #cldr

Download history 56/week @ 2023-09-18 935/week @ 2023-09-25 1580/week @ 2023-10-02 863/week @ 2023-10-09 1244/week @ 2023-10-16 1194/week @ 2023-10-23 991/week @ 2023-10-30 1178/week @ 2023-11-06 1577/week @ 2023-11-13

5,038 downloads per month
Used in 14 crates (4 directly)

Custom license

2MB
30K SLoC

icu_casemap crates.io

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

More Information

For more information on development, authorship, contributing etc. please visit ICU4X home page.


lib.rs:

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

Dependencies

~0.8–1.5MB
~30K SLoC