parseRadix static method

Int64 parseRadix(
  1. String source,
  2. int radix
)

Parses source in a given radix between 2 and 36.

Returns an Int64 with the numerical value of source. If the numerical value of source does not fit in a signed 64 bit integer, the numerical value is truncated to the lowest 64 bits of the value's binary representation, interpreted as a 64-bit two's complement integer.

The source string must contain a sequence of base-radix digits (using letters from a to z as digits with values 10 through 25 for radixes above 10), possibly prefixed by a - sign.

Throws a FormatException if the input is not recognized as a valid integer numeral.

Implementation

static Int64 parseRadix(String source, int radix) =>
    _parseRadix(source, u.validateRadix(radix), true)!;