gecko-dev/third_party/rust/unicode-normalization
Servo VCS Sync be92d942e5 No bug - Revendor rust dependencies 2017-10-24 17:55:24 +00:00
..
scripts Bug 1383831 - Upgrade rust-url to version 1.5.1 r=froydnj 2017-08-02 13:44:48 +03:00
src Bug 1383831 - Upgrade rust-url to version 1.5.1 r=froydnj 2017-08-02 13:44:48 +03:00
.cargo-checksum.json No bug - Revendor rust dependencies 2017-10-24 17:55:24 +00:00
.travis.yml Bug 1151899 - Vendor rust-url-capi deps; r=valentin,ted 2016-10-28 16:34:19 -07:00
COPYRIGHT Bug 1151899 - Vendor rust-url-capi deps; r=valentin,ted 2016-10-28 16:34:19 -07:00
Cargo.toml Bug 1383831 - Upgrade rust-url to version 1.5.1 r=froydnj 2017-08-02 13:44:48 +03:00
LICENSE-APACHE Bug 1151899 - Vendor rust-url-capi deps; r=valentin,ted 2016-10-28 16:34:19 -07:00
LICENSE-MIT Bug 1151899 - Vendor rust-url-capi deps; r=valentin,ted 2016-10-28 16:34:19 -07:00
README.md Bug 1336607 - Update vendored Rust sources to include geckolib dependencies; r=froydnj 2017-02-10 12:19:18 -08:00

README.md

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

Build Status

Documentation

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.3"