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

Go to the source code of this file.

Functions

int isalnum (int c)
 Checks if the given character is an alphanumeric character. More...
 

Function Documentation

◆ isalnum()

int isalnum ( int  ch)

Checks if the given character is an alphanumeric character.

Checks if the given character is an alphanumeric character using the default locale. The following characters are alphanumeric:

  • digits (0123456789)
  • uppercase letters (ABCDEFGHIJKLMNOPQRSTUVWXYZ)
  • lowercase letters (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 alphanumeric character, 0 otherwise.

Definition at line 5 of file isalnum.c.

6 {
7  return isalpha(c) || isdigit(c);
8 }
int isalpha(int ch)
Checks if the given character is an alphabetic character.
Definition: isalpha.c:5
int isdigit(int ch)
Checks if the given character is a numeric character.
Definition: isdigit.c:5

References isalpha(), and isdigit().

Referenced by ispunct().

Here is the caller graph for this function: