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

Go to the source code of this file.

Functions

int isalpha (int c)
 Checks if the given character is an alphabetic character. More...
 

Function Documentation

◆ isalpha()

int isalpha ( int  ch)

Checks if the given character is an alphabetic character.

Checks if the given character is an alphabetic character, i.e. either an uppercase letter (ABCDEFGHIJKLMNOPQRSTUVWXYZ), or a lowercase letter (abcdefghijklmnopqrstuvwxyz)

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 alphabetic character, zero otherwise.

Definition at line 5 of file isalpha.c.

6 {
7  return ((unsigned)c | 32) - 'a' < 26;
8 }

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

Here is the caller graph for this function: