Skip to content

ctype.h

Methods

Return Method
int isalnum( int c )
int isalpha( int c )
int isdigit( int c )
int ispunct( int c )
int isspace( int c )
int isupper( int c )
int islower( int c )
int toupper( int c )
int tolower( int c )

Method Descriptions

int isalnum( int c )
Checks whether c is alphabetic or numeric, A-Z, a-z or 0-9.

Returns 1 if so, returns 0 otherwise.


int isalpha( int c )
Checks whether c is alphabetic, A-Z or a-z.

Returns 1 if so, returns 0 otherwise.


int isdigit( int c )
Checks whether c is a decimal digit, 0-9.

Returns 1 if so, returns 0 otherwise.


int ispunct( int c )

Checks whether c is a punctuation character found below.

! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~

Returns 1 if so, returns 0 otherwise.


int isspace( int c )
Checks whether c is a white-space character found below.

\t \n \v \f \r

Returns 1 if so, returns 0 otherwise.


int isupper( int c )
Checks whether c is an uppercase letter, A-Z.

Returns 1 if so, returns 0 otherwise.


int islower( int c )
Checks whether c is a lowercase letter, a-z.

Returns 1 if so, returns 0 otherwise.


int toupper( int c )

Returns an uppercase equivalent of c.

Returns c if not alphabetic.


int tolower( int c )

Returns a lowercase equivalent of c.

Returns c if not alphabetic.