Function icu_properties::exemplar_chars::exemplars_numbers

source ·
pub fn exemplars_numbers(
    locale: &DataLocale,
) -> Result<UnicodeSetData, PropertiesError>
Expand description

Get the “numbers” set of exemplar characters.

Enabled with the compiled_data Cargo feature.

📚 Help choosing a constructor

§Examples

use icu::locid::locale;
use icu::properties::exemplar_chars;

let data =
    exemplar_chars::exemplars_numbers(&locale!("en").into())
    .expect("locale should be present");
let exemplars_numbers = data.as_borrowed();

assert!(exemplars_numbers.contains_char('0'));
assert!(exemplars_numbers.contains_char('9'));
assert!(exemplars_numbers.contains_char('%'));
assert!(exemplars_numbers.contains_char(','));
assert!(exemplars_numbers.contains_char('.'));
assert!(!exemplars_numbers.contains_char('!'));
assert!(!exemplars_numbers.contains_char('?'));