commit | df9f11f8318b6f5e54284c1ee64a038119f47c15 | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Sun Jan 16 14:32:17 2022 -0800 |
committer | Linux Build Service Account <lnxbuild@localhost> | Sun Jan 16 14:32:17 2022 -0800 |
tree | 214b179b4ffa07c7969655088f3361f7650a1aa1 | |
parent | 0b0f16759c8c883d5c6affd6249dd014e88ea8e2 [diff] | |
parent | 739cf5aa507b6d8e8f080d8fd84f5e2007b908a8 [diff] |
Merge 739cf5aa507b6d8e8f080d8fd84f5e2007b908a8 on remote branch Change-Id: Iffa20f516ad35114fe6dd827cdd629be06725573
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
.