1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
//! # Septem
//!
//! A library for working with roman numerals. Converting at will between strings, integers and roman
//! numerals.
//!
//! # Examples
//! ```rust
//! extern crate septem;
//! use septem::{Roman};
//!
//! let sept: Roman = "vii".parse().unwrap();
//! assert_eq!(7, *sept);
//! assert_eq!("VII", sept.to_string());
//! assert_eq!("vii", sept.to_lowercase());
//! ```
//!
//! The `prelude` include is required to support from `std::str::{FromStr}` trait and the
//! `Roman::from_str` function.
//!
//! ```rust
//! extern crate septem;
//! use septem::prelude::*;
//! use septem::{Roman};
//!
//! let roman = Roman::from_str("dxxxii").unwrap();
//! assert_eq!(532, *roman);
//! ```
mod errors;
mod digit;
mod roman;
pub mod prelude {
pub use std::str::{FromStr};
}
pub use crate::{
digit::{Digit},
roman::{Roman},
errors::{Result, Error}
};