pub fn parse_int(text: &str, radix: u8) -> f64
The parseInt() function parses a string argument and returns an integer of the specified radix (the base in mathematical numeral systems), or NaN on error.
parseInt()
MDN documentation