# isalpha

## NAME



           isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph,
           islower, isprint, ispunct, isspace, isupper, isxdigit, isalnum_l,
           isalpha_l, isascii_l, isblank_l, iscntrl_l, isdigit_l, isgraph_l,
           islower_l, isprint_l, ispunct_l, isspace_l, isupper_l, isxdigit_l
           - character classification functions
    


## LIBRARY



           Standard C library (_libc_ , _-lc_)
    


## SYNOPSIS



           **#include <ctype.h>**
    
           **int isalnum(int** _c_**);**
           **int isalpha(int** _c_**);**
           **int iscntrl(int** _c_**);**
           **int isdigit(int** _c_**);**
           **int isgraph(int** _c_**);**
           **int islower(int** _c_**);**
           **int isprint(int** _c_**);**
           **int ispunct(int** _c_**);**
           **int isspace(int** _c_**);**
           **int isupper(int** _c_**);**
           **int isxdigit(int** _c_**);**
    
           **int isascii(int** _c_**);**
           **int isblank(int** _c_**);**
    
           **int isalnum_l(int** _c_**, locale_t** _locale_**);**
           **int isalpha_l(int** _c_**, locale_t** _locale_**);**
           **int isblank_l(int** _c_**, locale_t** _locale_**);**
           **int iscntrl_l(int** _c_**, locale_t** _locale_**);**
           **int isdigit_l(int** _c_**, locale_t** _locale_**);**
           **int isgraph_l(int** _c_**, locale_t** _locale_**);**
           **int islower_l(int** _c_**, locale_t** _locale_**);**
           **int isprint_l(int** _c_**, locale_t** _locale_**);**
           **int ispunct_l(int** _c_**, locale_t** _locale_**);**
           **int isspace_l(int** _c_**, locale_t** _locale_**);**
           **int isupper_l(int** _c_**, locale_t** _locale_**);**
           **int isxdigit_l(int** _c_**, locale_t** _locale_**);**
    
           **int isascii_l(int** _c_**, locale_t** _locale_**);**
    
       Feature Test Macro Requirements for glibc (see
       feature_test_macros(7)):
    
           **isascii**():
               _XOPEN_SOURCE
                   || /* glibc >= 2.19: */ _DEFAULT_SOURCE
                   || /* glibc <= 2.19: */ _SVID_SOURCE
    
           **isblank**():
               _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
    
           **isalnum_l**(), **isalpha_l**(), **isblank_l**(), **iscntrl_l**(), **isdigit_l**(),
           **isgraph_l**(), **islower_l**(), **isprint_l**(), **ispunct_l**(), **isspace_l**(),
           **isupper_l**(), **isxdigit_l**():
               Since glibc 2.10:
                   _XOPEN_SOURCE >= 700
               Before glibc 2.10:
                   _GNU_SOURCE
    
           **isascii_l**():
               Since glibc 2.10:
                   _XOPEN_SOURCE >= 700 && (_SVID_SOURCE || _BSD_SOURCE)
               Before glibc 2.10:
                   _GNU_SOURCE
    


## DESCRIPTION



           These  functions  check whether _c_ , which must have the value of an
           _unsigned char_  or  **EOF** ,  falls  into  a  certain  character  class
           according to the specified locale.  The functions without the "_l"
           suffix perform the check based on the current locale.
    
           The  functions with the "_l" suffix perform the check based on the
           locale specified by the locale object  _locale_.   The  behavior  of
           these  functions  is  undefined  if  _locale_  is the special locale
           object **LC_GLOBAL_LOCALE**(see  duplocale(3))  or  is  not  a  valid
           locale object handle.
    
           The list below explains the operation of the functions without the
           "_l"  suffix;  the  functions  with the "_l" suffix differ only in
           using the locale object _locale_ instead of the current locale.
    
           **isalnum**()
                  checks for an alphanumeric character; it is equivalent to
                  _(isalpha(c) || isdigit(c))_.
    
           **isalpha**()
                  checks for an alphabetic character; in the standard **"C"**
                  locale, it is equivalent to _(isupper(c) || islower(c))_.  In
                  some locales, there may be additional characters for which
                  **isalpha**() is true—letters which are neither uppercase nor
                  lowercase.
    
           **isascii**()
                  checks whether _c_ is a 7-bit _unsigned char_ value that fits
                  into the ASCII character set.
    
           **isblank**()
                  checks for a blank character; that is, a space or a tab.
    
           **iscntrl**()
                  checks for a control character.
    
           **isdigit**()
                  checks for a digit (0 through 9).
    
           **isgraph**()
                  checks for any printable character except space.
    
           **islower**()
                  checks for a lowercase character.
    
           **isprint**()
                  checks for any printable character including space.
    
           **ispunct**()
                  checks for any printable character which is not a space or
                  an alphanumeric character.
    
           **isspace**()
                  checks for white-space characters.  In the **"C"** and **"POSIX"**
                  locales, these are: space, form-feed (**'\f'**), newline
                  (**'\n'**), carriage return (**'\r'**), horizontal tab (**'\t'**), and
                  vertical tab (**'\v'**).
    
           **isupper**()
                  checks for an uppercase letter.
    
           **isxdigit**()
                  checks for hexadecimal digits, that is, one of
                  **0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F**.
    


## RETURN VALUE



           The values returned are nonzero if the character _c_ falls into the
           tested class, and zero if not.
    


## ATTRIBUTES



           For an explanation of the terms used in this section, see
           attributes(7).
           ┌──────────────────────────────────────┬───────────────┬─────────┐
           │ **Interface** │ **Attribute** │ **Value** │
           ├──────────────────────────────────────┼───────────────┼─────────┤
           │ **isalnum**(), **isalpha**(), **isascii**(),     │ Thread safety │ MT-Safe │
           │ **isblank**(), **iscntrl**(), **isdigit**(),     │               │         │
           │ **isgraph**(), **islower**(), **isprint**(),     │               │         │
           │ **ispunct**(), **isspace**(), **isupper**(),     │               │         │
           │ **isxdigit**()                           │               │         │
           └──────────────────────────────────────┴───────────────┴─────────┘
    


## STANDARDS



           **isalnum**()
           **isalpha**()
           **iscntrl**()
           **isdigit**()
           **isgraph**()
           **islower**()
           **isprint**()
           **ispunct**()
           **isspace**()
           **isupper**()
           **isxdigit**()
           **isblank**()
                  C11, POSIX.1-2008.
    
           **isascii**()
           **isalnum_l**()
           **isalpha_l**()
           **isblank_l**()
           **iscntrl_l**()
           **isdigit_l**()
           **isgraph_l**()
           **islower_l**()
           **isprint_l**()
           **ispunct_l**()
           **isspace_l**()
           **isupper_l**()
           **isxdigit_l**()
                  POSIX.1-2008.
    
           **isascii_l**()
                  GNU.
    


## CAVEATS



           The standards require that the argument _c_ for these functions is
           either **EOF** or a value that is representable in the type _unsigned_
           _char_ ; otherwise, the behavior is undefined.  If the argument _c_ is
           of type _char_ , it must be cast to _unsigned char_ , as in the
           following example:
    
               char c;
               ...
               res = toupper((unsigned char) c);
    
           This is necessary because _char_ may be the equivalent of _signed_
           _char_ , in which case a byte where the top bit is set would be sign
           extended when converting to _int_ , yielding a value that is outside
           the range of _unsigned char_.
    
           The details of what characters belong to which class depend on the
           locale.  For example, **isupper**() will not recognize an A-umlaut (Ä)
           as an uppercase letter in the default **C** locale.
    


* * *