Skip to content
Reference > Methods

strParseLong(text,base)

Definition

Long strParseLong(String text, Number base)

Description

Parses a string to a Long for a given radix (aka base) and returns that Long. Note, Radix up to 36 means the text is parsed as case insensitive, higher than 36, then it's case sensitive.

Parameter Definition

Name Type Description
text String The text to parse
base Number the base of the text, ex: base 10 is typical, 16 for hex

Examples

1
2
3
Long r1 = strParseLong("1234",10); // r1 == 1234
Long r2 = strParseLong("12fa",16); // r2 == 4858
Object r3 = strParseLong("12Zz",64); // r3 == null