#unicode-characters #unicode #unicode-text #character-property #no-alloc #text

no-std unicode-properties

Query character Unicode properties according to UAX #44 and UTR #51

4 releases

0.1.3 Sep 30, 2024
0.1.2 Aug 19, 2024
0.1.1 Jan 18, 2024
0.1.0 Jul 27, 2023

#14 in No standard library

Download history 412346/week @ 2024-10-24 405936/week @ 2024-10-31 397112/week @ 2024-11-07 396910/week @ 2024-11-14 414161/week @ 2024-11-21 389375/week @ 2024-11-28 409601/week @ 2024-12-05 418665/week @ 2024-12-12 285199/week @ 2024-12-19 212492/week @ 2024-12-26 372224/week @ 2025-01-02 494691/week @ 2025-01-09 523275/week @ 2025-01-16 600203/week @ 2025-01-23 623957/week @ 2025-01-30 688256/week @ 2025-02-06

2,535,679 downloads per month
Used in 2,640 crates (14 directly)

MIT/Apache

295KB
3.5K SLoC

unicode-properties

Build Status Current Version License: MIT/Apache-2.0


lib.rs:

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.

No runtime deps

Features