Math ParseInt
The math::parseint
function parses a string representation of a number into an integer.
Syntax
math::parseint(<string>, <base>)
Parameters
string
: The input string to parse into an integer.base
: The numerical base for parsing (e.g., 10 for decimal, 16 for hexadecimal).
Returns
- Number: The parsed integer value.
Example
math::parseint("42", 10)
This function is useful for converting strings into integers for mathematical or logical operations.