string.parseLong()

Convert the calling string of radix to a Long.

Signature

parseLong() => Long | Null

parseLong(radix: Int) => Long | Null

Description

The parseLong method converts the calling string for radix to a decimal Long.

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

  • Exponential notation isn’t allowed.

The calling string isn’t changed.

Parameters

Parameter Type Required Description

radix

Int

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

Return value

One of:

Type Description

Long

Value parsed from the calling string.

Null

Unable to parse calling String.

Examples

Convert an email address to upper case:

"10".parseLong()
10

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!