Function icu_properties::maps::general_category

source ·
pub const fn general_category() -> CodePointMapDataBorrowed<'static, GeneralCategory>
Expand description

Return a CodePointMapDataBorrowed for the General_Category Unicode enumerated property. See GeneralCategory.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

§Example

use icu::properties::{maps, GeneralCategory};

assert_eq!(maps::general_category().get('木'), GeneralCategory::OtherLetter);  // U+6728
assert_eq!(maps::general_category().get('🎃'), GeneralCategory::OtherSymbol);  // U+1F383 JACK-O-LANTERN