6 stable releases
1.3.0 | Sep 12, 2024 |
---|---|
1.2.2 | Mar 10, 2024 |
1.2.1 | Dec 14, 2023 |
1.2.0 | Oct 14, 2023 |
1.0.0 | Aug 13, 2023 |
#844 in Text processing
106,006 downloads per month
Used in 41 crates
(via unicode_names2)
30KB
651 lines
unicode_names2
Time and memory efficiently mapping characters to and from their Unicode 16.0 names, at runtime and compile-time.
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.
Dependencies
~2MB
~33K SLoC