UCE Docs / float_val

Signature

f64 float_val(String s)

Parameters

s : string to be converted
return value : a f64 containing the number (0 if no number could be identified).

Extracts a floating point number from a String.

If no usable number can be identified, the result is 0.

Example

print(float_val("3.14") + 1.0, "\n");
Output
4.14