Crate unicode_normalization [] [src]

Unicode character composition and decomposition utilities as described in Unicode Standard Annex #15.

extern crate unicode_normalization;

use unicode_normalization::char::compose;
use unicode_normalization::UnicodeNormalization;

fn main() {
    assert_eq!(compose('A','\u{30a}'), Some('Å'));

    let s = "ÅΩ";
    let c = s.nfc().collect::<String>();
    assert_eq!(c, "ÅΩ");
}

crates.io

You can use this package in your project by adding the following to your Cargo.toml:

[dependencies]
unicode-normalization = "0.1.0"

Modules

char

Methods for composing and decomposing characters.

Structs

Decompositions

External iterator for a string decomposition's characters.

Recompositions

External iterator for a string recomposition's characters.

Constants

UNICODE_VERSION

The version of Unicode that this version of unicode-normalization is based on.

Traits

UnicodeNormalization

Methods for iterating over strings while applying Unicode normalizations as described in Unicode Standard Annex #15.