Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
isupper.c File Reference
#include <ctype.h>
Include dependency graph for isupper.c:

Go to the source code of this file.

Functions

int isupper (int c)
 Checks if the given character is an uppercase character. More...
 

Function Documentation

◆ isupper()

int isupper ( int  ch)

Checks if the given character is an uppercase character.

Checks if the given character is an uppercase character using the default local. isupper returns true only for the uppercase letters (ABCDEFGHIJKLMNOPQRSTUVWXYZ). If isupper returns true, it is guaranteed that

See also
iscntrl,
isdigit,
ispunct,
isspace will return false for the same character in the same default locale.

The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.

Parameters
chThe character to classify
Returns
Non-zero value if the character is an uppercase letter, zero otherwise.

Definition at line 5 of file isupper.c.

6 {
7  return (unsigned)c - 'A' < 26;
8 }

Referenced by strtol(), strtoll(), strtoul(), and tolower().

Here is the caller graph for this function: