numerus

Crates.ionumerus
lib.rsnumerus
version0.1.1
sourcesrc
created_at2019-09-01 00:53:12.487793
updated_at2019-09-03 18:48:30.910625
descriptionConvert integers to roman numerals and vice versa
homepage
repositoryhttps://github.com/FilippoRanza/numerus
max_upload_size
id161240
size12,335
Filippo Ranza (FilippoRanza)

documentation

README

numerus

Build Status crates.io

Convert integers to roman numerals and vice versa

Examples

Convert from int to roman numeral.

    use numerus::int_to_roman_upper;
    let a = 14;
    assert_eq!(int_to_roman_upper(a).unwrap(), "XIV");

Convert a roman numeral to int

    use numerus::roman_to_int;
    let year = "MCMXCVIII";
    assert_eq!(roman_to_int(year).unwrap(), 1998);

For more examples see the documentaion

Commit count: 13

cargo fmt