Skip to content

isLowerCase

Checks if a string contains at least one lowercase letter and no uppercase letters.

Syntax

typescript
isLowerCase(str: string): boolean

Parameters

ParameterTypeDescription
strstringThe string to be checked.

Returns

TypeDescription
booleantrue if the string contains at least one lowercase letter and no uppercase letters, otherwise false.

Example

typescript
isLowerCase("abc"); // true
isLowerCase("Abc"); // false
isLowerCase("123"); // false
isLowerCase(""); // false

Notes

  • Throws TypeError if the argument is not a string.
  • Spaces are ignored in the check.

References

Released under the MIT License.