IsCharUpper

3.0

  BOOL IsCharUpper(chTest)    
  char chTest; /* character to test, */  

The IsCharUpper function determines whether a character is in the set of language-defined uppercase characters.

Parameters

chTest

Specifies the character to be tested.

Return Value

The return value is nonzero if the character is uppercase. Otherwise, it is zero.

Comments

The language driver for the current language (the language the user selected at setup or by using Control Panel) determines whether the character is in the set. If no language driver is selected, Windows uses an internal function.

Example

The following example uses the IsCharUpper function to find the first uppercase character in a string:

/* Look through the string for an uppercase character. */

for (lpszUpper = lpsz;
        !IsCharUpper(*lpszUpper) && lpszUpper != '\0';
        lpszUpper = AnsiNext(lpszUpper));

/* Return NULL if no uppercase character is found. */

if (lpszUpper == '\0')
    lpszUpper = NULL;

See Also

IsCharLower