Expand description
Query character Unicode properties according to Unicode Standard Annex #44 and Unicode Technical Standard #51 rules.
Currently we support the General_Category
property as well as Emoji
and Emoji_Component
.
Future properties can be added as requested.
use unicode_properties::UnicodeEmoji;
use unicode_properties::UnicodeGeneralCategory;
let ch = '🦀'; // U+1F980 CRAB
let is_emoji = ch.is_emoji_char();
let group = ch.general_category_group();
println!("{}({:?})", ch, group);
println!("The above char {} for use as emoji char.",
if is_emoji { "is recommended" } else { "is not recommended" });
§Features
§general-category
Provides the most general classification of a character, based on its primary characteristic.
§emoji
Provides the emoji character properties of a character.
Modules§
- emoji
- Query the emoji character properties of a character.
- general_
category - Query the general category property of a character.
Enums§
- Emoji
Status - The emoji character properties of a character.
- General
Category - The most general classification of a character.
- General
Category Group - Groupings of the most general classification of a character.
Constants§
- UNICODE_
VERSION - The version of Unicode that this version of unicode-security is based on.
Traits§
- Unicode
Emoji - Query the emoji character properties of a character.
- Unicode
General Category - Query the general category property of a character.