unicode_general_category

Function get_general_category

Source
pub fn get_general_category(chr: char) -> GeneralCategory
Expand description

Look up the general category for a character.

ยงExample

use unicode_general_category::{get_general_category, GeneralCategory};

assert_eq!(get_general_category('A'), GeneralCategory::UppercaseLetter);