Crate whoa_german_numbers
source · [−]Expand description
whoa-german-numbers
is a crate that parses and converts written german numbers like “dreitausend” back and forth into integers.
Notably, numbers are not segmented by spaces or dashes in german - meaning they can be quite unruly sometimes.
Usage
use whoa_german_numbers::{number_to_text, text_to_number};
let num = text_to_number("zwölf");
assert_eq!(num.unwrap(), 12);
let str = number_to_text(121);
assert_eq!(str, "einhunderteinundzwanzig");