Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/numeral_systems.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,20 @@ declare_named! {
/// > ०, १, २, ३, ४, ५, ६, ७, ८, ९, १०, ११
Devanagari = "devanagari" ("१"),

/// Decimal positional notation using
/// [Tibetan numerals](https://en.wikipedia.org/wiki/Tibetan_numerals).
///
/// ## Representable Numbers
///
/// All non-negative integers can be represented.
///
/// ## Example
///
/// The first twelve non-negative integers are represented as follows:
///
/// > ༠, ༡, ༢, ༣, ༤, ༥, ༦, ༧, ༨, ༩, ༡༠, ༡༡
Tibetan = "tibetan" ("༡"),

/// Decimal positional notation using
/// [Bengali numerals](https://en.wikipedia.org/wiki/Bengali_numerals).
///
Expand Down Expand Up @@ -816,6 +830,10 @@ impl NamedNumeralSystem {
'०', '१', '२', '३', '४', '५', '६', '७', '८', '९',
]),

Self::Tibetan => NumeralSystem::Positional(&[
'༠', '༡', '༢', '༣', '༤', '༥', '༦', '༧', '༨', '༩',
]),

Self::Bengali => NumeralSystem::Positional(&[
'০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯',
]),
Expand Down Expand Up @@ -1419,6 +1437,7 @@ mod tests {
NamedNumeralSystem::EasternArabic => 277754701051910363703826860323053920831,
NamedNumeralSystem::Persian => 6232158096065129450489636457808686806,
NamedNumeralSystem::Devanagari => 327133969362282954753636774557232534052,
NamedNumeralSystem::Tibetan => 87580519645280744681237273097105390953,
NamedNumeralSystem::Bengali => 79096832028418218544110224478554962928,
NamedNumeralSystem::BengaliLetters => 269999388716378396079918080520770981179,
NamedNumeralSystem::Symbols => 88780534058354093087932015985325954737,
Expand Down
Loading