inRange method
Checks if the string's length is within the specified range.
@param min The minimum length of the range.
@param max The maximum length of the range.
@return True if the string's length is between min
and max
, inclusive.
Implementation
bool inRange(int min, int max) => length >= min && length <= max;