Go to file
openharmony_ci c476201ea5
!2 README.OpenSource 中License信息整改
Merge pull request !2 from peizhe/master
2023-05-05 02:26:45 +00:00
.github/workflows Fix cd to package 2021-02-08 17:06:21 -08:00
benches Remove stable feature flag iterator_step_by 2020-04-10 23:37:38 +03:00
fuzz Handle multiple starters in the stream-safe fuzzer. 2021-05-17 21:20:24 -07:00
scripts Update to Unicode 15 and bump version to 0.1.22 2022-09-16 23:22:08 +08:00
src Update to Unicode 15 and bump version to 0.1.22 2022-09-16 23:22:08 +08:00
tests Update to Unicode 14 2022-07-01 14:41:03 +02:00
.gitignore Ignore .txt files so that they don't get published 2017-02-03 16:52:48 -08:00
.travis.yml Add no_std + alloc support 2020-04-10 23:37:38 +03:00
BUILD.gn Add GN Build Files and Custom Modifications 2023-04-18 18:33:06 +08:00
Cargo.toml Update to Unicode 15 and bump version to 0.1.22 2022-09-16 23:22:08 +08:00
COPYRIGHT add license info, .travis.yml, Cargo.toml 2015-04-14 19:33:17 -04:00
LICENSE-APACHE add license info, .travis.yml, Cargo.toml 2015-04-14 19:33:17 -04:00
LICENSE-MIT add license info, .travis.yml, Cargo.toml 2015-04-14 19:33:17 -04:00
README.md Update to Unicode 15 and bump version to 0.1.22 2022-09-16 23:22:08 +08:00
README.OpenSource README.OpenSource 中License信息整改 2023-05-04 11:30:23 +08:00

unicode-normalization

Build Status Docs

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.22"

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.