String is uppercase

JavaScript, String · Sep 15, 2020

Checks if a string is upper case.

const isUpperCase = str => str === str.toUpperCase();
isUpperCase('ABC'); // true
isUpperCase('A3@$'); // true
isUpperCase('aB4'); // false

More like this

  • Swapcase string

    JavaScript, String

    Creates a string with uppercase characters converted to lowercase and vice versa.

  • String is anagram

    JavaScript, String

    Checks if a string is an anagram of another string (case-insensitive, ignores spaces, punctuation and special characters).

  • Checks if a string contains a substring, case-insensitive.