Unicode Normalization forms according to UAX#15 rules
Go to file
Manish Goregaokar 1598cfaff2
Some checks failed
Rust / build (beta) (push) Has been cancelled
Rust / build (nightly) (push) Has been cancelled
Rust / build (stable) (push) Has been cancelled
Rust / msrv (push) Has been cancelled
Rust / regen (push) Has been cancelled
Merge pull request #104 from altendky/patch-1
follow SPDX for short license text
2024-11-13 16:55:49 +00:00
.github/workflows Use tinyvec 1.6.0 in msrv build 2024-09-15 14:38:42 +02:00
benches Check benches and fuzz tests in CI 2024-02-29 16:55:53 -05:00
fuzz Fix string creating logic and add comments 2024-10-31 10:53:31 +00:00
scripts Fix composition table 2024-09-17 13:48:35 +02:00
src Expose all iterator constructors, add hyperlinks to Unicode glossary/technical reports 2024-10-13 00:57:38 +02:00
tests Update normalization_tests.rs to Unicode 16.0.0 2024-09-13 16:04:32 +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
Cargo.toml follow SPDX for short license text 2024-09-25 12:33:53 -04: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 Bump version to 0.1.23 2024-02-16 16:55:42 +01: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.23"

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.