UTF-8 Width

Build Status

To determine the width of a UTF-8 character by providing its first byte.

References: https://tools.ietf.org/html/rfc3629

Examples

```rust extern crate utf8_width;

asserteq!(1, utf8width::getwidth(b'1')); asserteq!(3, utf8width::getwidth("δΈ­".as_bytes()[0])); ```

Benchmark

bash cargo bench

Crates.io

https://crates.io/crates/utf8-width

Documentation

https://docs.rs/utf8-width

License

MIT