commit | 42977aa58e730ff53eed851a58d760134215919e | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Wed Feb 16 21:43:44 2022 -0800 |
committer | Linux Build Service Account <lnxbuild@localhost> | Wed Feb 16 21:43:44 2022 -0800 |
tree | 0ee559588586481d8143b065faecf42d26133e40 | |
parent | 461301965fb9d18bd3a68c33ca28c79e84cb3e79 [diff] | |
parent | d3ec94be3b69d2af0b79dbbd784889d8b7f08065 [diff] |
Merge d3ec94be3b69d2af0b79dbbd784889d8b7f08065 on remote branch Change-Id: I8b5e5397541c05def85449d7fb4bfe966b6afd37
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.19"
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
.