Signature
u64 to_u64(String s, u64 fallback = 0)
Parameters
s : string to parse
fallback : value returned when
s is empty or not a complete unsigned integerreturn value : parsed u64, or
fallback.Parses a trimmed string as a base-10 unsigned integer.
Unlike int_val(), the whole trimmed string must be consumed by the parser. Empty strings and partially parsed values such as "42px" return the fallback.
Example
print(to_u64("7"), "\n");
Output
7