Hex.len constructor

Hex.len(
  1. int len, {
  2. String? mal,
  3. String? diff,
})

Constrains the input data to the hexadecimal digits 0-9A–F and its length (number of digits) to len hex-digits.

len the number of hex-digits; it must be > 0. mal the error message if non-hex characters are found; if omitted, the default value is 'non-hex-digit character(s) found'. diff the error message if the number of hex-digits is different from len.

Implementation

Hex.len(int len, {String? mal, String? diff})
    : assert(len > 0),
      _valHex = _HexImpl(mal, Len(len, diff: diff).call).call;