File: README.md

package info (click to toggle)
rust-unicode-names2 0.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,140 kB
  • sloc: python: 192; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 677 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# unicode_names2

[![Build Status](https://travis-ci.org/ProgVal/unicode_names2.png)](https://travis-ci.org/ProgVal/unicode_names2)

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

```rust
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**](https://docs.rs/unicode_names2)