Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 810 Bytes

README.md

File metadata and controls

21 lines (15 loc) · 810 Bytes

unicode_names

Build Status Coverage Status

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

extern crate unicode_names;

fn main() {
    println!("☃ is called {}", unicode_names::name('☃')); // SNOWMAN
    println!("{} is happy", unicode_names::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