Skip to main content

parse_int_js

Function parse_int_js 

Source
pub fn parse_int_js(input: &str, radix: u32) -> f64
Expand description

JS-spec parseInt(s, radix) for an already-converted radix.

radix == 0 means auto-detect: 0x / 0X prefix → base 16, otherwise base 10. radix == 16 also accepts the 0x prefix. Other radices in [2, 36] are taken literally; out-of-range radices return NaN.