#roman-numerals #roman

numerals

Library for numeric systems, both ancient and modern

5 releases

Uses old Rust 2015

0.1.4 Apr 25, 2020
0.1.3 Apr 7, 2020
0.1.2 Mar 10, 2018
0.1.1 Sep 25, 2016
0.1.0 May 29, 2015

#150 in Value formatting

Download history 145/week @ 2023-01-21 188/week @ 2023-01-28 128/week @ 2023-02-04 137/week @ 2023-02-11 176/week @ 2023-02-18 234/week @ 2023-02-25 148/week @ 2023-03-04 151/week @ 2023-03-11 1487/week @ 2023-03-18 976/week @ 2023-03-25 1045/week @ 2023-04-01 829/week @ 2023-04-08 982/week @ 2023-04-15 1511/week @ 2023-04-22 1008/week @ 2023-04-29 774/week @ 2023-05-06

4,351 downloads per month
Used in 16 crates (5 directly)

MIT license

13KB
254 lines

rust-numerals numerals on crates.io Build Status

This is a library for various numeric systems, including ancient, modern, and just plain strange.

Although the Roman module is likely to be the most popular, I maintain an interest in the others, so they’re all packaged as one!

View the Rustdoc

Installation

This library works with Cargo. Add the following to your Cargo.toml dependencies section:

[dependencies]
numerals = "0.1"

The earliest version of Rust that this crate is tested against is Rust v1.31.0.

Roman Numerals

To format a number as Roman numerals, use Roman::from to convert it, and the UpperHex formatting trait to format it.

use numerals::roman::Roman;

let string = format!("{:X}", Roman::from(134));
assert_eq!(string, "CXXXIV");

No runtime deps