pub fn parse_i32(i: &str) -> IResult<&str, i32> {
    let mut trimmed = i;
    // will munch whitespace before the phrase if whitespace exists
    match whitespace(i) {
        Err(_) => {},
        Ok(x) => {
            trimmed = x.0;
        }
    }
    // parses until the next whitespace
    let result = not_whitespace(trimmed)?;
    // returns the result of parsing the bytes as an int
    Ok((result.0, result.1.parse::<i32>().unwrap()))
}
// munches through whitespace to find the first non whitespace character, and parses it as an int
// until the next whitespace
munches through whitespace to find the first non whitespace character, and parses it as an int
until the next whitespace
munches through whitespace to find the first non whitespace character and parses it as an int until the next whitespace
pub fn parse_i32(i: &str) -> IResult<&str, i32> {
    let mut trimmed = i;
    // will munch whitespace before the phrase if whitespace exists
    match whitespace(i) {
        Err(_) => {},
        Ok(x) => {
            trimmed = x.0;
        }
    }
    // parses until the next whitespace
    let result = not_whitespace(trimmed)?;
    // returns the result of parsing the bytes as an int
    Ok((result.0, result.1.parse::<i32>().unwrap()))
}
pub fn parse_i32 ( i : & str ) -> IResult < & str , i32 > { let mut trimmed = i ; // will munch whitespace before the phrase if whitespace exists match whitespace ( i ) { Err ( _ ) => { } , Ok ( x ) => { trimmed = x . 0 ; } } // parses until the next whitespace let result = not_whitespace ( trimmed ) ? ; // returns the result of parsing the bytes as an int Ok ( ( result . 0 , result . 1 . parse :: < i32 > ( ) . unwrap ( ) ) ) }
munches through whitespace to find the first non whitespace character, and parses it as an int
until the next whitespace
munches through whitespace to find the first non whitespace character and parses it as an int until the next whitespace
i
&str
i
&str