tryParseHex static method

Int32? tryParseHex(
  1. String source
)

Parses source as a hexadecimal numeral.

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

The source string must contain a sequence of hexadecimal digits (0-9, a-f or A-F), possibly prefixed by a - sign.

Returns null if the input is not a valid hexadecimal integer numeral.

Implementation

static Int32? tryParseHex(String source) => _parseRadix(source, 16, false);