Bug: 175870123

Clone this repo:
  1. 905bc77 Migrate to cargo_embargo. am: 59d61a5fc0 by Andrew Walbran · 4 months ago main master
  2. 59d61a5 Migrate to cargo_embargo. by Andrew Walbran · 4 months ago
  3. cd05ca5 Make unicode-normalization available to product and vendor am: 14353b32f4 am: 6d5d9f67eb am: 9301fae67e am: 5ec3d86044 by Matthew Maurer · 12 months ago android14-qpr1-release android14-qpr1-s2-release android-14.0.0_r16 android-14.0.0_r17 android-14.0.0_r18 android-14.0.0_r19 android-14.0.0_r20 android-14.0.0_r21 android-14.0.0_r22 android-14.0.0_r23 android-14.0.0_r24 android-14.0.0_r25 android-14.0.0_r26 android-14.0.0_r27
  4. 5ec3d86 Make unicode-normalization available to product and vendor am: 14353b32f4 am: 6d5d9f67eb am: 9301fae67e by Matthew Maurer · 12 months ago android14-dev
  5. 9301fae Make unicode-normalization available to product and vendor am: 14353b32f4 am: 6d5d9f67eb by Matthew Maurer · 12 months ago

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.