validateLength static method

void validateLength(
  1. String addr,
  2. int lenExp
)

Validate address length.

Implementation

static void validateLength(
  String addr,
  int lenExp,
) {
  if (addr.length != lenExp) {
    throw AddressConverterException(
      'Invalid length (expected $lenExp, got ${addr.length})',
    );
  }
}