You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
3 years ago | |
|---|---|---|
| .. | ||
| .github/workflows | 3 years ago | |
| benches | 3 years ago | |
| scripts | 3 years ago | |
| src | 3 years ago | |
| .cargo_vcs_info.json | 3 years ago | |
| .gitignore | 3 years ago | |
| .travis.yml | 3 years ago | |
| Android.bp | 3 years ago | |
| COPYRIGHT | 3 years ago | |
| Cargo.toml | 3 years ago | |
| Cargo.toml.orig | 3 years ago | |
| LICENSE | 3 years ago | |
| LICENSE-APACHE | 3 years ago | |
| LICENSE-MIT | 3 years ago | |
| METADATA | 3 years ago | |
| MODULE_LICENSE_APACHE2 | 3 years ago | |
| OWNERS | 3 years ago | |
| README.md | 3 years ago | |
| TEST_MAPPING | 3 years ago | |
| cargo2android.json | 3 years ago | |
README.md
unicode-normalization
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, "ÅΩ");
}
crates.io
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 support
This 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.