Returns true if the string length does not exceed max characters.
true
max
The string to check.
Maximum length (inclusive).
hasMaxLength("hello", 10) // => truehasMaxLength("hello", 3) // => false Copy
hasMaxLength("hello", 10) // => truehasMaxLength("hello", 3) // => false
Returns
trueif the string length does not exceedmaxcharacters.