uce/site/doc/pages/int_val.txt
2026-06-15 21:42:50 +00:00

23 lines
495 B
Plaintext

:sig
u64 int_val(String s, u32 base = 10)
:params
s : string to be converted
base : number system base (default 10)
return value : a u64 containing the number (0 if no number could be identified).
:see
>string
float_val
0_String
:content
Extracts an integer value from `s`.
The `base` argument controls which number system is used while parsing. If no usable number can be identified, the function returns `0`.
Related:
- PHP: `intval()`
- JavaScript / Node.js: `Number()` or `parseInt()`