Module num_format::parsing

source ·
Expand description

Module with traits for parsing a formatted string into a number.

§Examples

use num_format::Locale;
use num_format::parsing::ParseFormatted;

fn main() {
    let s = "1,000,000";
    let n = s.parse_formatted::<_, u32>(&Locale::en).unwrap();
    assert_eq!(n, 1_000_000);
}

Traits§