3 releases (breaking)

Uses old Rust 2015

0.4.0 Mar 17, 2020
0.3.0 Jul 26, 2019
0.2.0 Jun 17, 2018

#211 in #unicode


Used in unicode_names2

MIT/Apache

2MB
22K SLoC

unicode_names2

Build Status

Time and memory efficiently mapping characters to and from their Unicode 8.0 names, at runtime and compile-time.

extern crate unicode_names2;

fn main() {
    println!("☃ is called {}", unicode_names2::name('')); // SNOWMAN
    println!("{} is happy", unicode_names2::character("white smiling face")); //
    // (NB. case insensitivity)
}

The maps are compressed using similar tricks to Python's unicodedata module, although those here are about 70KB (12%) smaller.

Documentation


lib.rs:

A macro that maps unicode names to chars and strings.

Dependencies

~4.5MB
~107K SLoC