Skip to main content

str2num_float_only

Function str2num_float_only 

Source
pub fn str2num_float_only(s: &[u8], o: &mut LuaValue) -> usize
Expand description

Float-only string-to-number, faithful to the 5.1/5.2 lua_str2number, which has no integer subtype and parses every numeral through strtod (including hexadecimal). Skipping str2int is what keeps an over-u64 hex literal (e.g. "0x" followed by 150 fs) at its rounded double magnitude instead of the wrapped Int(-1) the dual-number path produces.