commit | a3a8c6f3c786183ebb10898eb340b4f2e9649aca | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Fri Mar 10 05:18:14 2023 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Fri Mar 10 05:18:14 2023 +0000 |
tree | f11c84d894f53d6a34e202d2158d1d2c4f74c372 | |
parent | bceb7d0e460b319d1062c95380e65123ef50cf45 [diff] | |
parent | cd05ca5e052e16782351414873af1a9a132695d3 [diff] |
Snap for 9722771 from cd05ca5e052e16782351414873af1a9a132695d3 to udc-d1-release Change-Id: I7b27eedda57ad8c7627c99851ee41ecf139c62d6
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.22"
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
.