| Crates.io | utf8-width |
| lib.rs | utf8-width |
| version | 0.1.7 |
| created_at | 2020-06-25 01:03:45.53494+00 |
| updated_at | 2023-11-20 14:39:07.295376+00 |
| description | To determine the width of a UTF-8 character by providing its first byte. |
| homepage | https://magiclen.org/utf8-width |
| repository | https://github.com/magiclen/utf8-width |
| max_upload_size | |
| id | 257735 |
| size | 9,026 |
To determine the width of a UTF-8 character by providing its first byte.
References: https://tools.ietf.org/html/rfc3629
assert_eq!(1, utf8_width::get_width(b'1'));
assert_eq!(3, utf8_width::get_width("δΈ".as_bytes()[0]));
cargo bench
https://crates.io/crates/utf8-width