| commit | bc47f7d3eecfb37c2acaf0b9d024aac84186dc8c | [log] [tgz] |
|---|---|---|
| author | Android Build Coastguard Worker <[email protected]> | Tue Sep 24 23:14:28 2024 +0000 |
| committer | Android Build Coastguard Worker <[email protected]> | Tue Sep 24 23:14:28 2024 +0000 |
| tree | 48c8bec55eee423880da7c9640c0e60d43128584 | |
| parent | ca9b3a458d6bd7631af11bebff3c1699514fdf90 [diff] | |
| parent | a8e3db96a2ba75fd9a0d47ef09e9f0efed1ac460 [diff] |
Snap for 12410557 from a8e3db96a2ba75fd9a0d47ef09e9f0efed1ac460 to sdk-release Change-Id: If53120ad86c7a5d7b59c76d9bd36774d0fdc2954
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.