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

#149 in Value formatting

Download history 13136/week @ 2025-10-09 11977/week @ 2025-10-16 11551/week @ 2025-10-23 12566/week @ 2025-10-30 10006/week @ 2025-11-06 9482/week @ 2025-11-13 11085/week @ 2025-11-20 11737/week @ 2025-11-27 18226/week @ 2025-12-04 15835/week @ 2025-12-11 13006/week @ 2025-12-18 8933/week @ 2025-12-25 14172/week @ 2026-01-01 14997/week @ 2026-01-08 13491/week @ 2026-01-15 17378/week @ 2026-01-22

61,811 downloads per month
Used in 57 crates (5 directly)

MIT license

13KB
254 lines

rust-numerals 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