Crate icu_locid_macros[][src]

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

langid

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

language

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

region

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

script

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

variant

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