assertMaxLength function

void assertMaxLength(
  1. int length,
  2. int max
)

Asserts that length is less than or equal to max.

Implementation

void assertMaxLength(final int length, final int max) {
  assert(length <= max, 'The length $length is greater than $max');
}