Crate icu_locid_macros[][src]

Expand description

icu_locid_macros is one of the ICU4X components.

This API provides convenience macros for icu_locid.

Examples

use icu_locid_macros::{language, region, langid};

let lid = langid!("EN_US");

assert_eq!(lid.language, language!("en"));
assert_eq!(lid.region, Some(region!("US")));

Macros

A macro allowing for compile-time construction of valid LanguageIdentifier.

A macro allowing for compile-time construction of valid Language subtag.

A macro allowing for compile-time construction of valid Region subtag.

A macro allowing for compile-time construction of valid Script subtag.

A macro allowing for compile-time construction of valid Variant subtag.