icu_properties::maps

Function 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