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

A macro allowing for compile-time construction of valid SubdivisionSuffix subtags.

§Examples

Parsing errors don’t have to be handled at runtime:

assert_eq!(
  icu_locale_core::extensions::unicode::subdivision_suffix!("sct"),
  "sct".parse::<icu_locale_core::extensions::unicode::SubdivisionSuffix>().unwrap()
);

Invalid input is a compile failure:

icu_locale_core::extensions::unicode::subdivision_suffix!("toolooong");