[Previous]
[Contents]
[Next]

isalpha()

test to see if a character is a letter

Synopsis:

#include <ctype.h>
int isalpha( int c );

Description:

The isalpha() function tests if the argument c is an alphabetic character ('a' to 'z' and 'A' to 'Z'). An alphabetic character is any character for which isupper() or islower() is true.

Returns:

Zero if the argument isn't an alphabetic character; otherwise, a nonzero value.

Examples:

#include <stdio.h>
#include <ctype.h>

void main()
  {
    if( isalpha( getchar() ) ) {
      printf( "is alphabetic\n" );
    }
  }

Classification:

ANSI

Safety:
Interrupt handler Yes
Signal handler Yes
Thread Yes

See also:

isalnum(), iscntrl(), isdigit(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit()


[Previous]
[Contents]
[Next]