commit | a8e3db96a2ba75fd9a0d47ef09e9f0efed1ac460 | [log] [tgz] |
---|---|---|
author | James Farrell <[email protected]> | Wed Sep 18 20:37:05 2024 +0000 |
committer | James Farrell <[email protected]> | Wed Sep 18 20:37:05 2024 +0000 |
tree | 48c8bec55eee423880da7c9640c0e60d43128584 | |
parent | 2f0b9a45f93e9d80a7311bf5392dd20ed15997ec [diff] |
Migrate 26 crates to monorepo tokio-util tower tower-layer tower-service tracing tracing-attributes tracing-core tracing-subscriber try-lock tungstenite twox-hash ucd-trie unicode-bidi unicode-normalization unicode-segmentation unicode-width unsafe-libyaml userfaultfd utf-8 uuid weak-table webpki which winnow x509-cert xml-rs Bug: http://b/339424309 Test: treehugger Change-Id: I6ef30c40ca9653e54a970914f45d1f2c7c1d7d66
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
.