string.parseLong()

Convert a String to a Long.

Signature

parseLong() => Number | Null

parseLong(radix: Number) => Number | Null

Description

Converts the calling String to a numeric Long.

The calling String isn’t changed.

Limitations

  • Leading and trailing whitespace and comma separators result in an error.

  • Exponential notation isn’t allowed.

Parameters

Parameter Type Required Description

radix

Number

Value between 2 and 36 that represents the radix of the calling String. Default = 10.

Return value

One of:

Type Description

Number

Long parsed from the calling String.

Null

Unable to parse calling String.

Examples

Convert an email address to upper case:

"10".parseLong()
10
\