commit | e8b9dc8adc2e7a6e9f8095fab2fbcb9167091a29 | [log] [tgz] |
---|---|---|
author | android-build-team Robot <android-build-team-robot@google.com> | Wed Feb 17 04:32:13 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Feb 17 04:32:13 2021 +0000 |
tree | 2989b0f2513ec077e19233acc697804504d18b8e | |
parent | a7237c716d0394bb6e166c1e7ce100c0656862c2 [diff] | |
parent | 57ef71688e86cc0e55ebabb80a1d3a47971461db [diff] |
Snap for 7149879 from e3a8df8ac4c09fca58d49098ebd1992ef8168a3e to sc-release am: 57ef71688e Original change: https://googleplex-android-review.googlesource.com/c/platform/external/rust/crates/unicode-normalization/+/13594625 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ia872f86495ea07f05a7b74229425d52957807b8a
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
.