Function roman::from [] [src]

pub fn from(txt: &str) -> Option<i32>

Converts a roman numeral to an integer.

Works for integer between 1 and 3999 inclusive, returns None otherwise.

Example

let x = roman::from("XIV");
assert_eq!(x.unwrap(), 14);