function
atol
atol(str: String) -> Int
Parses the given string as a base-10 integer and returns that value.
For example, atol("19")
returns 19
. If the given string cannot be parsed
as an integer value, an error is raised. For example, atol("hi")
raises an
error.
Args:
- str (
String
): A string to be parsed as a base-10 integer.
Returns:
An integer value that represents the string, or otherwise raises.