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
COPYRIGHT
Cargo.toml Bug 1383831 - Upgrade rust-url to version 1.5.1 r=froydnj 2017-08-02 13:44:48 +03:00
LICENSE-APACHE
LICENSE-MIT
README.md

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"