Function googology::knuth_yllion::full_name[][src]

pub fn full_name(digits: &str) -> Result<String, ParseError>

Gives a full length name for a number represented by an arbitrary sequence of digits.

Arguments

  • digits - A string slice that holds a representation of the number using only the digits 0-9. If any other character is present, this function will return an Err.

Example

use googology::knuth_yllion::full_name;
let name = full_name("1200426208").unwrap();
let expected = "twelve myllion forty two myriad sixty two hundred eight";
assert_eq!(name.as_str(), expected);