[−][src]Function numerus::numerus_lib::roman_to_int::roman_to_int
pub fn roman_to_int(number: &str) -> Option<i32>
Convert given roman numeral into an integer. This function accepts, at the same time, both uppercase and lowercase character.
The function fails if any invalid character is meet.
use numerus::roman_to_int; let wrong_roman = "XCK"; match roman_to_int(wrong_roman) { Some(_) => assert!(false), None => assert!(true) }