commit | c0981492fffb22bc19bfb4804635e9f2046133e8 | [log] [tgz] |
---|---|---|
author | Jeff Vander Stoep <jeffv@google.com> | Mon Dec 21 16:30:24 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Dec 21 16:30:24 2020 +0000 |
tree | 0136cc345fed635d4e2e2570df21987703f9b8fd | |
parent | a1ba54ec1b2c117c37822b9f11c2cd6dd3fbe488 [diff] | |
parent | 4dc50db10c32a8ac40d37d679128179f3156d742 [diff] |
Iniital import of unicode-normalization v0.1.16 am: 12bf0863fe am: 1721046199 am: 4dc50db10c Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/unicode-normalization/+/1533349 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ibc6773fc391d4f0f4c716f753fca00681e27fb02
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, "ÅΩ"); }
You can use this package in your project by adding the following to your Cargo.toml
:
[dependencies] unicode-normalization = "0.1.16"
no_std
+ alloc
supportThis 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
.