releases-comm-central/third_party/rust/unicode-normalization
Rob Lemley 94f8f9398c Bug 1860654 - Add vendored Rust deps. rs=me
This is a reproducible commit. Running mach tb-rust vendor again
with mozilla-central and comm-central on the same head revs will
produce the same output.

https://hg.mozilla.org/mozilla-central/rev/55cd203304b8d5343dd941d772085dc25fd278c4
https://hg.mozilla.org/comm-central/rev/8a0750b85f6d85fbf5c2e17a29fbc8112112c374
2023-12-12 14:05:09 -05:00
..
benches Bug 1860654 - Add vendored Rust deps. rs=me 2023-12-12 14:05:09 -05:00
scripts Bug 1860654 - Add vendored Rust deps. rs=me 2023-12-12 14:05:09 -05:00
src Bug 1860654 - Add vendored Rust deps. rs=me 2023-12-12 14:05:09 -05:00
.cargo-checksum.json Bug 1860654 - Add vendored Rust deps. rs=me 2023-12-12 14:05:09 -05:00
COPYRIGHT Bug 1860654 - Add vendored Rust deps. rs=me 2023-12-12 14:05:09 -05:00
Cargo.toml Bug 1860654 - Add vendored Rust deps. rs=me 2023-12-12 14:05:09 -05:00
LICENSE-APACHE Bug 1860654 - Add vendored Rust deps. rs=me 2023-12-12 14:05:09 -05:00
LICENSE-MIT Bug 1860654 - Add vendored Rust deps. rs=me 2023-12-12 14:05:09 -05:00
README.md Bug 1860654 - Add vendored Rust deps. rs=me 2023-12-12 14:05:09 -05:00

README.md

unicode-normalization

Build Status Docs

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

This crate requires Rust 1.36+.

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

no_std + alloc support

This crate is completely no_std + alloc compatible. This can be enabled by disabling the std feature, i.e. specifying default-features = false for this crate on your Cargo.toml.