Expand description
Unicode character name properties as described in Unicode Standard Annex #44.
extern crate unicode_charname;
use unicode_charname::CharName;
fn main() {
assert_eq!('A'.char_name().unwrap_or_default().to_string(),
"LATIN CAPITAL LETTER A");
}§crates.io
You can use this package in your project by adding the following
to your Cargo.toml:
[dependencies]
unicode-charname = "0.1"§no_std + alloc support
This crate is completely no_std + alloc compatible. This can be enabled by disabling the std feature, i.e. specifying default-features = false for this crate on your Cargo.toml.
Structs§
- Name
- Represents retrieved Unicode character name.
Constants§
- UNICODE_
VERSION - The version of Unicode that this version of unicode-charname is based on.
Traits§
- Char
Name - Methods for retrieving character name for a code point.