macro_rules! region {
    ($region:literal) => { ... };
}
Expand description

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

The macro will perform syntax canonicalization of the tag.

Examples

use icu::locid::{region, subtags::Region};

const CN: Region = region!("cn");

let cn: Region = "cn".parse().unwrap();

assert_eq!(CN, "CN");
assert_eq!(CN, cn);