isUpper() (Simulated functionality)

Check if a character is upper case.

Property/method value type:Boolean primitive

This is a function normally found in the C language. However, it is useful to script developers as well and may be available in some implementations as an extension to the ECMA standard functionality.

This function will return true for any character in the following set:

A B C D E F G H I J K L M

N O P Q R S T U V W X Y Z

Strictly speaking, this function should be coded to be aware of locale specific issues. You may want to take the example simulation provided here and modify it to your own needs to support that. This is just a basic working example.

Example code:

   // Test for upper case letters (only good up to char 127)
   function isUpper(aChar)
   {
      myCharCode = aChar.charCodeAt(0);
   
      if((myCharCode > 64) && (myCharCode <  91))
      {
         return true;
      }
   
   return false;
   }

See also:ASCII, Character handling, Character set, Character testing, Character-case mapping, Enquiry functions, isLower(), Letter, Unicode