1// This file is part of ICU4X. For terms of use, please see the file
2// called LICENSE at the top level of the ICU4X source tree
3// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
4
5impl_tinystr_subtag!(
6 /// A script subtag (examples: `"Latn"`, `"Arab"`, etc.)
7 ///
8 /// [`Script`] represents a Unicode base language code conformant to the
9 /// [`unicode_script_id`] field of the Language and Locale Identifier.
10 ///
11 /// # Examples
12 ///
13 /// ```
14 /// use icu::locid::subtags::Script;
15 ///
16 /// let script: Script =
17 /// "Latn".parse().expect("Failed to parse a script subtag.");
18 /// ```
19 ///
20 /// [`unicode_script_id`]: https://unicode.org/reports/tr35/#unicode_script_id
21 Script,
22 subtags,
23 script,
24 subtags_script,
25 4..=4,
26 s,
27 s.is_ascii_alphabetic(),
28 s.to_ascii_titlecase(),
29 s.is_ascii_alphabetic_titlecase(),
30 InvalidSubtag,
31 ["Latn"],
32 ["Latin"],
33);
34