maxLen method
Checks if the string's length is less than or equal to the specified maximum.
@param max The maximum length to check against.
@return True if the string's length is at most max
, false otherwise.
Implementation
bool maxLen(int max) => length <= max;