diff --git a/src/numeral_systems.rs b/src/numeral_systems.rs index 39ce4ac..2590a88 100644 --- a/src/numeral_systems.rs +++ b/src/numeral_systems.rs @@ -408,6 +408,33 @@ declare_named! { /// > ٨, ٩, /// > ١٠, ١١ EasternArabic = "arabic.eastern" ("١"), + + /// Abjad order + /// [Arabic letters](https://en.wikipedia.org/wiki/Abjad). + /// + /// ## Representable Numbers + /// + /// All non-negative integers can be represented. + /// + /// ## Example + /// + /// The first twenty-eight positive integers are represented as follows: + /// + /// > أ, ب, + /// > ج, د, + /// > ه, و, + /// > ز, ح, + /// > ط, ي, + /// > ك, ل + /// > م, ن + /// > س, ع + /// > ف, ص + /// > ق, ر + /// > ش, ت + /// > ث, خ + /// > ذ, ض + /// > ظ, غ + ArabicAbjad = "arabic.abjad" ("أ"), /// Decimal positional notation using the Persian variant of /// [Eastern Arabic numerals](https://en.wikipedia.org/wiki/Eastern_Arabic_numerals#Numerals). @@ -821,6 +848,11 @@ impl NamedNumeralSystem { Self::EasternArabic => NumeralSystem::Positional(&[ '٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩', ]), + + Self::ArabicAbjad => NumeralSystem::Positional(&[ + 'أ', 'ب', 'ج', 'د', 'ه', 'و', 'ز', 'ح', 'ط', 'ي', 'ك', 'ل', 'م', 'ن', + 'س', 'ع', 'ف', 'ص', 'ق', 'ر', 'ش', 'ت', 'ث', 'خ', 'ذ', 'ض', 'ظ', 'غ', + ]), Self::Persian => NumeralSystem::Positional(&[ '۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹', @@ -1435,6 +1467,7 @@ mod tests { NamedNumeralSystem::KoreanJamo => 65477685939649764827530478995838083425, // 21 NamedNumeralSystem::KoreanSyllable => 24217153056183571894327643661698510954, NamedNumeralSystem::EasternArabic => 277754701051910363703826860323053920831, + NamedNumeralSystem::ArabicAbjad => 332217778941065507236060222268877272547, NamedNumeralSystem::Persian => 6232158096065129450489636457808686806, NamedNumeralSystem::Devanagari => 327133969362282954753636774557232534052, NamedNumeralSystem::Tibetan => 87580519645280744681237273097105390953,