|
#define | __isctype(c, x) (__ctype_get(c) & x) |
|
#define | isalnum(c) __isctype(c, _CTalnum) |
|
#define | isalpha(c) __isctype(c, _CTalpha) |
|
#define | isblank(c) __isctype(c, _CTb) |
|
#define | iscntrl(c) __isctype(c, _CTc) |
|
#define | isdigit(c) __isctype(c, _CTd) |
|
#define | isgraph(c) (!__isctype(c, (_CTc|_CTs)) && (__ctype_get(c) != 0)) |
|
#define | islower(c) __isctype(c, _CTl) |
|
#define | isprint(c) (!__isctype(c, (_CTc)) && (__ctype_get(c) != 0)) |
|
#define | ispunct(c) __isctype(c, _CTp) |
|
#define | isspace(c) __isctype(c, _CTs) |
|
#define | isupper(c) __isctype(c, _CTu) |
|
#define | isxdigit(c) __isctype(c, _CTx) |
|
Provides character class check API macros.
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 current locale.
Conforms to C99, 4.3BSD. C89 specifies all of these functions except isascii() and isblank(). isascii() is a BSD extension and is also an SVr4 extension. isblank() conforms to POSIX.1-2001 and C99 7.4.1.3. POSIX.1-2008 marks isascii() as obsolete, noting that it cannot be used portably in a localized application.
Definition in file ctype.h.
#define isalpha |
( |
|
c | ) |
__isctype(c, _CTalpha) |
Checks for an alphabetic class character.
The isalpha function tests for any character for which isupper or islower is true, or any character that is one of a locale-specific set of alphabetic characters for which none of iscntrl, isdigit, ispunct, or isspace is true.156) In the "C" locale, isalpha returns true only for the characters for which isupper or islower is true.
Definition at line 67 of file ctype.h.
#define islower |
( |
|
c | ) |
__isctype(c, _CTl) |
Checks for a lower-case character.
The islower function tests for any character that is a lowercase letter or is one of a locale-specific set of characters for which none of iscntrl, isdigit, ispunct, or isspace is true. In the * "C" locale, islower returns true only for the characters defined as lowercase letters.
Definition at line 102 of file ctype.h.
#define isupper |
( |
|
c | ) |
__isctype(c, _CTu) |
Checks for an upper-case character.
The isupper function tests for any character that is an uppercase letter or is one of a locale-specific set of characters for which none of iscntrl, isdigit, ispunct, or isspace is true. In the "C" locale, isupper returns true only for the characters defined as uppercase letters.
Definition at line 132 of file ctype.h.
Converts an uppercase letter to a corresponding lowercase letter.
If the argument is a character for which isupper is true and there are one or more corresponding characters, as specified by the current locale, for which islower is true, the tolower function returns one of the corresponding characters (always the same one for any given locale); otherwise, the argument is returned unchanged.
- Parameters
-
- Returns
- Uppercase version of c according to locale.
Converts a lowercase letter to a corresponding uppercase letter.
If the argument is a character for which islower is true and there are one or more corresponding characters, as specified by the current locale, for which isupper is true, the toupper function returns one of the corresponding characters (always the same one for any given locale); otherwise, the argument is returned unchanged.
- Parameters
-
- Returns
- Lowercase version of c according to locale.