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 42 43 44 45
//! //! # Numerus //! //! Convert integers to roman numerals and vice versa //! //! //! ## Examples //! //! Convert from integer to an uppercase roman numeral. //! ``` //! use numerus::int_to_roman_upper; //! //! let a = 14; //! assert_eq!(int_to_roman_upper(a).unwrap(), "XIV"); //! ``` //! //! Convert from integer to a lowercase roman numeral. //! ``` //! use numerus::int_to_roman_lower; //! //! let a = 789; //! assert_eq!(int_to_roman_lower(a).unwrap(), "dcclxxxix"); //! ``` //! //! //! Convert from a roman numeral to an integer //! ``` //! use numerus::roman_to_int; //! //! let year = "MCMXCVIII"; //! assert_eq!(roman_to_int(year).unwrap(), 1998); //! ``` //! //! See functions documentation for more information //! about error handling //! pub mod numerus_lib; pub use numerus_lib::int_to_roman::{ int_to_roman_upper, int_to_roman_lower }; pub use numerus_lib::roman_to_int::roman_to_int;