Function icu_properties::exemplar_chars::exemplars_index
source · pub fn exemplars_index(
locale: &DataLocale,
) -> Result<UnicodeSetData, PropertiesError>
Expand description
Get the “index” 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_index(&locale!("en").into())
.expect("locale should be present");
let exemplars_index = data.as_borrowed();
assert!(!exemplars_index.contains_char('a'));
assert!(!exemplars_index.contains_char('z'));
assert!(!exemplars_index.contains("a"));
assert!(!exemplars_index.contains("ä"));
assert!(!exemplars_index.contains("ng"));
assert!(exemplars_index.contains("A"));