Function icu_properties::exemplar_chars::exemplars_main
source · pub fn exemplars_main(
locale: &DataLocale,
) -> Result<UnicodeSetData, PropertiesError>
Expand description
Get the “main” set of exemplar characters.
✨ Enabled with the compiled_data
Cargo feature.
§Examples
use icu::locid::locale;
use icu::properties::exemplar_chars;
let data = exemplar_chars::exemplars_main(&locale!("en").into())
.expect("locale should be present");
let exemplars_main = data.as_borrowed();
assert!(exemplars_main.contains_char('a'));
assert!(exemplars_main.contains_char('z'));
assert!(exemplars_main.contains("a"));
assert!(!exemplars_main.contains("ä"));
assert!(!exemplars_main.contains("ng"));
assert!(!exemplars_main.contains("A"));