Skip to main content

js_number_to_string

Function js_number_to_string 

Source
pub fn js_number_to_string(value: f64) -> String
Expand description

Spell a number the way JavaScript’s String(number) does.

This is ECMA-262 Number::toString(10): the shortest digit string that round-trips, laid out as plain decimal for exponents in (-7, 21] and as d.ddde±X otherwise. Negative zero spells 0.