S2R

Parameters
s string

The string to be converted.

comment

Returns a real by parsing the string for a number. Returns 0 for: values too big or too small, an empty string or text that doesn't start with a number.

Lua: For null raises an error.

note

This function only works for decimal strings. Hexadecimal or octal strings are not supported.

note

The parser stops at the first non-number character [0-9.] - does not support comma , as a decimal point. If the input string starts with some valid input but ends in invalid input this will return the conversion of the valid part: S2R(".123asd") == 0.123.

pure
This function is pure. For the same values passed to it, it will always return the same value.
patch

1.00

Source
common.j
return type
real
Source code
native S2R  takes string s returns real