2 releases
Uses new Rust 2024
new 0.1.1 | May 22, 2025 |
---|---|
0.1.0 | May 21, 2025 |
#143 in Value formatting
60 downloads per month
18KB
454 lines
arithmos
A library for converting Arabic numerals to Classical Attic numerals Library formatting inspired by: https://github.com/AA-Turner/roman-numerals/blob/master/rust/src/lib.rs
License
GNU GPL 3
arithmos
A Rust library for converting Arabic numerals (1,2,3...) to Ancient Greek numerals (α', β', γ' ...)
Integers between 0 and 999,999 (inclusive) are currently supported. Any number
beyond this range will return an OutOfRangeError
.
Both uppercase and lowercase Greek formatting are supported.
Example usage
Create Greek numerals
use arithmos::GreekNumeral;
let num = GreekNumeral::new(616)?;
assert_eq!(num.to_string(), "ΧΙϜ'");
let num: RomanNumeral = 49_999.try_into().unwrap();
println!("{}", num); // ͵Μ͵ΘϠϘΘ'
License
GPL-3.0