Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
|
Go to the source code of this file.
Macros | |
#define | _CTYPE_A 0x00000100L /* Alpha */ |
#define | _CTYPE_C 0x00000200L /* Control */ |
#define | _CTYPE_D 0x00000400L /* Digit */ |
#define | _CTYPE_G 0x00000800L /* Graph */ |
#define | _CTYPE_L 0x00001000L /* Lower */ |
#define | _CTYPE_P 0x00002000L /* Punct */ |
#define | _CTYPE_S 0x00004000L /* Space */ |
#define | _CTYPE_U 0x00008000L /* Upper */ |
#define | _CTYPE_X 0x00010000L /* X digit */ |
#define | _CTYPE_B 0x00020000L /* Blank */ |
#define | _CTYPE_R 0x00040000L /* Print */ |
#define | _CTYPE_I 0x00080000L /* Ideogram */ |
#define | _CTYPE_T 0x00100000L /* Special */ |
#define | _CTYPE_Q 0x00200000L /* Phonogram */ |
#define | _CTYPE_SW0 0x20000000L /* 0 width character */ |
#define | _CTYPE_SW1 0x40000000L /* 1 width character */ |
#define | _CTYPE_SW2 0x80000000L /* 2 width character */ |
#define | _CTYPE_SW3 0xc0000000L /* 3 width character */ |
#define | _CTYPE_SWM 0xe0000000L /* Mask for screen width data */ |
#define | _CTYPE_SWS 30 /* Bits to shift to get width */ |
Functions | |
int | isalnum (int ch) |
Checks if the given character is an alphanumeric character. More... | |
int | isalpha (int ch) |
Checks if the given character is an alphabetic character. More... | |
int | isascii (int ch) |
Checks if a given character is a 7-bit US-ASCII character. More... | |
int | isblank (int ch) |
Checks if the given character is a blank character. More... | |
int | iscntrl (int ch) |
Checks if the given character is a control character. More... | |
int | isdigit (int ch) |
Checks if the given character is a numeric character. More... | |
int | isgraph (int ch) |
Checks if the given character has a graphical representation. More... | |
int | islower (int ch) |
Checks if the given character is classified as a lowercase character. More... | |
int | isprint (int ch) |
Checks if the given character can be printed. More... | |
int | ispunct (int ch) |
Checks if the given character is a punctuation character. More... | |
int | isspace (int ch) |
Checks if the given character is a whitespace character. More... | |
int | isupper (int ch) |
Checks if the given character is an uppercase character. More... | |
int | isxdigit (int ch) |
Checks if the given character is a hexadecimal numeric character. More... | |
int | tolower (int ch) |
Converts the given character to lowercase. More... | |
int | toupper (int ch) |
Converts the given character to lowercase. More... | |
int | toascii (int ch) |
Converts the given character to ASCII. More... | |
#define _CTYPE_SWM 0xe0000000L /* Mask for screen width data */ |
int isalnum | ( | int | ch | ) |
Checks if the given character is an alphanumeric character.
Checks if the given character is an alphanumeric character using the default locale. The following characters are alphanumeric:
The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.
ch | The character to classify |
Definition at line 5 of file isalnum.c.
References isalpha(), and isdigit().
Referenced by ispunct().
int isalpha | ( | int | ch | ) |
Checks if the given character is an alphabetic character.
Checks if the given character is an alphabetic character, i.e. either an uppercase letter (ABCDEFGHIJKLMNOPQRSTUVWXYZ), or a lowercase letter (abcdefghijklmnopqrstuvwxyz)
The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.
ch | The character to classify |
Definition at line 5 of file isalpha.c.
Referenced by isalnum(), strtol(), strtoll(), and strtoul().
int isascii | ( | int | ch | ) |
Checks if a given character is a 7-bit US-ASCII character.
Checks if a given character 7-bit unsigned char value that fits into the ASCII character set. which is any character between 0 and 0x7f inclusive.
The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.
ch | The character to classify |
int isblank | ( | int | ch | ) |
Checks if the given character is a blank character.
Checks if the given character is a blank character using the default locale. The following characters classified as blank:
The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.
ch | The character to classify |
Definition at line 5 of file isblank.c.
Referenced by iswblank().
int iscntrl | ( | int | ch | ) |
Checks if the given character is a control character.
Checks if the given character is a control character. The following are examples of control character:
The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.
ch | The character to classify |
int isdigit | ( | int | ch | ) |
Checks if the given character is a numeric character.
Checks if the given character is a numeric character (0123456789).
The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.
ch | The character to classify |
Definition at line 5 of file isdigit.c.
Referenced by atoi(), atol(), atoll(), isalnum(), isxdigit(), strtol(), strtoll(), and strtoul().
int isgraph | ( | int | ch | ) |
Checks if the given character has a graphical representation.
Checks if the given character has a graphical representation using the default locale. The following characters are graphical:
The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.
ch | The character to classify |
Definition at line 5 of file isgraph.c.
Referenced by ispunct().
int islower | ( | int | ch | ) |
Checks if the given character is classified as a lowercase character.
Checks if the given character is classified as a lowercase character using the default local. islower returns true only for the lowercase letters (abcdefghijklmnopqrstuvwxyz). If islower returns true, it is guaranteed that
The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.
ch | The character to classify |
Definition at line 5 of file islower.c.
Referenced by toupper().
int isprint | ( | int | ch | ) |
Checks if the given character can be printed.
Checks if the given character can be printed using the default locale. The following characters are printable:
The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.
ch | The character to classify |
int ispunct | ( | int | ch | ) |
Checks if the given character is a punctuation character.
Checks if the given character is a punctuation character using the default local. The following characters are classified as punctuation character:
The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.
ch | The character to classify |
Definition at line 5 of file ispunct.c.
int isspace | ( | int | ch | ) |
Checks if the given character is a whitespace character.
Checks if the given character is a whitespace character. The following are examples of a whitespace character:
The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.
ch | The character to classify |
Definition at line 5 of file isspace.c.
Referenced by atol(), atoll(), strtol(), strtoll(), strtoul(), and strtoull().
int isupper | ( | int | ch | ) |
Checks if the given character is an uppercase character.
Checks if the given character is an uppercase character using the default local. isupper returns true only for the uppercase letters (ABCDEFGHIJKLMNOPQRSTUVWXYZ). If isupper returns true, it is guaranteed that
The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.
ch | The character to classify |
Definition at line 5 of file isupper.c.
Referenced by strtol(), strtoll(), strtoul(), and tolower().
int isxdigit | ( | int | ch | ) |
Checks if the given character is a hexadecimal numeric character.
Checks if the given character is a hexadecimal numeric character (0123456789).
The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.
ch | The character to classify |
Definition at line 5 of file isxdigit.c.
References isdigit().
int toascii | ( | int | ch | ) |
Converts the given character to ASCII.
Converts the given character to a 7-bit unsigned char value that fits into the ASCII character set.
ch | character to be converted. |
int tolower | ( | int | ch | ) |
Converts the given character to lowercase.
Converts the given character to lowercase according to the character conversion rules defined by the default local, i.e. the following uppercase letters (ABCDEFGHIJKLMNOPQRSTUVWXYZ) are replaced with respective lowercase letters (abcdefghijklmnopqrstuvwxyz).
The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.
ch | character to be converted. |
Definition at line 5 of file tolower.c.
References isupper().
Referenced by towlower().
int toupper | ( | int | ch | ) |
Converts the given character to lowercase.
Converts the given character to lowercase according to the character conversion rules defined by the default local, i.e. the following lowercase letters (abcdefghijklmnopqrstuvwxyz) are replaced with respective uppercase letters (ABCDEFGHIJKLMNOPQRSTUVWXYZ).
The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.
ch | character to be converted. |
Definition at line 5 of file toupper.c.
References islower().
Referenced by towupper().