MentOS  0.8.0
The Mentoring Operating System
Macros | Functions
ctype.c File Reference

Functions related to character handling. More...

Macros

#define OFFSET   32
 Distance from a uppercase character to the correspondent lowercase in ASCII.
 

Functions

int isdigit (int c)
 Check if the given value is a digit. More...
 
int isalpha (int c)
 Check if the given value is a letter. More...
 
int iscntrl (int c)
 Check if the given value is a control character. More...
 
int isalnum (int c)
 Check if the given value is either a letter or a digit. More...
 
int isxdigit (int c)
 Check if the given value is an hexadecimal digit. More...
 
int islower (int c)
 Check if the given value is a lower case letter. More...
 
int isupper (int c)
 Check if the given value is an upper case letter. More...
 
int tolower (int c)
 Transforms the given value into a lower case letter. More...
 
int toupper (int c)
 Transforms the given value into an upper case letter. More...
 
int isspace (int c)
 Check if the given value is a whitespace. More...
 

Detailed Description

Functions related to character handling.

Function Documentation

◆ isalnum()

int isalnum ( int  c)

Check if the given value is either a letter or a digit.

Parameters
cThe input character.
Returns
1 on success, 0 otherwise.

◆ isalpha()

int isalpha ( int  c)

Check if the given value is a letter.

Parameters
cThe input character.
Returns
1 on success, 0 otherwise.

◆ iscntrl()

int iscntrl ( int  c)

Check if the given value is a control character.

Parameters
cThe input character.
Returns
1 on success, 0 otherwise.

◆ isdigit()

int isdigit ( int  c)

Check if the given value is a digit.

Parameters
cThe input character.
Returns
1 on success, 0 otherwise.

◆ islower()

int islower ( int  c)

Check if the given value is a lower case letter.

Parameters
cThe input character.
Returns
1 on success, 0 otherwise.

◆ isspace()

int isspace ( int  c)

Check if the given value is a whitespace.

Parameters
cThe input character.
Returns
1 on success, 0 otherwise.

◆ isupper()

int isupper ( int  c)

Check if the given value is an upper case letter.

Parameters
cThe input character.
Returns
1 on success, 0 otherwise.

◆ isxdigit()

int isxdigit ( int  c)

Check if the given value is an hexadecimal digit.

Parameters
cThe input character.
Returns
1 on success, 0 otherwise.

◆ tolower()

int tolower ( int  c)

Transforms the given value into a lower case letter.

Parameters
cThe input letter.
Returns
The input letter turned into a lower case letter.

◆ toupper()

int toupper ( int  c)

Transforms the given value into an upper case letter.

Parameters
cThe input letter.
Returns
The input letter turned into an upper case letter.