We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f156781 commit d86a110Copy full SHA for d86a110
src/lib.rs
@@ -20,6 +20,19 @@ impl Script {
20
pub fn short_name(self) -> &'static str {
21
self.inner_short_name()
22
}
23
+
24
+ /// Is this script "Recommended" according to
25
+ /// [UAX #31](www.unicode.org/reports/tr31/#Table_Recommended_Scripts)?
26
+ pub fn is_recommended(self) -> bool {
27
+ use Script::*;
28
+ match self {
29
+ Common | Inherited | Arabic | Armenian | Bengali | Bopomofo | Cyrillic | Devanagari
30
+ | Ethiopic | Georgian | Greek | Gujarati | Gurmukhi | Han | Hangul | Hebrew
31
+ | Hiragana | Kannada | Katakana | Khmer | Lao | Latin | Malayalam | Myanmar | Oriya
32
+ | Sinhala | Tamil | Telugu | Thaana | Thai | Tibetan => true,
33
+ _ => false,
34
+ }
35
36
37
38
impl From<char> for Script {
0 commit comments