#text #unicode #normalization #decomposition #recomposition

unicode-normalization

This crate provides functions for normalization of Unicode strings, including Canonical and Compatible Decomposition and Recomposition, as described in Unicode Standard Annex #15.

10 releases

0.1.6 May 2, 2018
0.1.5 Jun 15, 2017
0.1.4 Feb 4, 2017
0.1.3 Dec 19, 2016
0.0.3 Apr 15, 2015

#5 in Text processing

Download history 31743/week @ 2018-05-06 41569/week @ 2018-05-13 44926/week @ 2018-05-20 38804/week @ 2018-05-27 38016/week @ 2018-06-03 40468/week @ 2018-06-10 35326/week @ 2018-06-17 37181/week @ 2018-06-24 37787/week @ 2018-07-01 35764/week @ 2018-07-08 38611/week @ 2018-07-15 39976/week @ 2018-07-22 32885/week @ 2018-07-29

125,250 downloads per month

Unicode character composition and decomposition utilities as described in Unicode Standard Annex #15.

Build Status

Documentation

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

lib.rs:

Unicode character composition and decomposition utilities as described in Unicode Standard Annex #15.

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.7"
MIT/Apache-2.0 license
  • No runtime deps

Reverse deps