Crates.io | arithmos |
lib.rs | arithmos |
version | 0.1.1 |
created_at | 2025-05-21 05:32:44.519834+00 |
updated_at | 2025-05-22 05:28:43.26684+00 |
description | A library for converting Arabic numerals into Greek numerals |
homepage | https://codeberg.org/utricularius |
repository | https://codeberg.org/utricularius/arithmos |
max_upload_size | |
id | 1682958 |
size | 18,195 |
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.
use arithmos::GreekNumeral;
let num = GreekNumeral::new(616)?;
assert_eq!(num.to_string(), "ΧΙϜ'");
let num: RomanNumeral = 49_999.try_into().unwrap();
println!("{}", num); // ͵Μ͵ΘϠϘΘ'
GPL-3.0