Skip to content

char <-> Unicode character name (maintained fork of huonw/unicode_names)

License

Notifications You must be signed in to change notification settings

youknowone/unicode_names2

 
 

Repository files navigation

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

About

char <-> Unicode character name (maintained fork of huonw/unicode_names)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 99.6%
  • Other 0.4%