commit | d3030bae77905c45f4b58376c7e004efdb06061e | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <[email protected]> | Thu Aug 08 01:16:44 2024 +0000 |
committer | Android Build Coastguard Worker <[email protected]> | Thu Aug 08 01:16:44 2024 +0000 |
tree | 5cfffba0108a34b2f6683e76097cca58ee558ed0 | |
parent | 80f118b12875abd2f1459139d3cdc8a6af6b9953 [diff] | |
parent | 2efad77a9593747ed6db83b79f22233e14e08b37 [diff] |
Snap for 12199801 from 2efad77a9593747ed6db83b79f22233e14e08b37 to 25D4-release Change-Id: If0f23a05f3977f4ddde76b6a741b35d0cb9ae93f
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
.