uce/site/doc/pages/float_val.txt

22 lines
389 B
Plaintext

:sig
f64 float_val(String s)
:params
s : string to be converted
return value : a f64 containing the number (0 if no number could be identified).
:see
>string
int_val
String
:content
Extracts a floating point number from a `String`.
If no usable number can be identified, the result is `0`.
## Related Concepts
- PHP: `floatval()`
- JavaScript / Node.js: `Number()` or `parseFloat()`