Character types.
More...
Go to the source code of this file.
|
| | FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) |
| | FILE_SECBOOT (PERMITTED) |
| static int | isascii (int character) |
| | Check if character is ASCII.
|
| static int | isdigit (int character) |
| | Check if character is a decimal digit.
|
| static int | isxdigit (int character) |
| | Check if character is a hexadecimal digit.
|
| static int | isupper (int character) |
| | Check if character is an upper-case letter.
|
| static int | islower (int character) |
| | Check if character is a lower-case letter.
|
| static int | isalpha (int character) |
| | Check if character is alphabetic.
|
| static int | isalnum (int character) |
| | Check if character is alphanumeric.
|
| static int | isprint (int character) |
| | Check if character is printable.
|
| static int | tolower (int character) |
| | Convert character to lower case.
|
| static int | toupper (int character) |
| | Convert character to upper case.
|
| int | isspace (int character) |
| | Check to see if character is a space.
|
Character types.
Definition in file ctype.h.
◆ FILE_LICENCE()
| FILE_LICENCE |
( |
GPL2_OR_LATER_OR_UBDL | | ) |
|
◆ FILE_SECBOOT()
| FILE_SECBOOT |
( |
PERMITTED | | ) |
|
◆ isascii()
| int isascii |
( |
int | character | ) |
|
|
inlinestatic |
Check if character is ASCII.
- Parameters
-
- Return values
-
| is_ascii | Character is an ASCII character |
Definition at line 19 of file ctype.h.
19 {
20
21 return ( character <= '\x7f' );
22}
Referenced by parse_key().
◆ isdigit()
| int isdigit |
( |
int | character | ) |
|
|
inlinestatic |
◆ isxdigit()
| int isxdigit |
( |
int | character | ) |
|
|
inlinestatic |
Check if character is a hexadecimal digit.
- Parameters
-
- Return values
-
| is_xdigit | Character is a hexadecimal digit |
Definition at line 41 of file ctype.h.
41 {
42
43 return ( ( ( character >= '0' ) && ( character <= '9' ) ) ||
44 ( ( character >= 'A' ) && ( character <= 'F' ) ) ||
45 ( ( character >= 'a' ) && ( character <= 'f' ) ) );
46}
◆ isupper()
| int isupper |
( |
int | character | ) |
|
|
inlinestatic |
Check if character is an upper-case letter.
- Parameters
-
- Return values
-
| is_upper | Character is an upper-case letter |
Definition at line 54 of file ctype.h.
54 {
55
56 return ( ( character >= 'A' ) && ( character <= 'Z' ) );
57}
Referenced by isalpha(), and tolower().
◆ islower()
| int islower |
( |
int | character | ) |
|
|
inlinestatic |
Check if character is a lower-case letter.
- Parameters
-
- Return values
-
| is_lower | Character is a lower-case letter |
Definition at line 65 of file ctype.h.
65 {
66
67 return ( ( character >= 'a' ) && ( character <= 'z' ) );
68}
Referenced by isalpha(), and toupper().
◆ isalpha()
| int isalpha |
( |
int | character | ) |
|
|
inlinestatic |
Check if character is alphabetic.
- Parameters
-
- Return values
-
| is_alpha | Character is alphabetic |
Definition at line 76 of file ctype.h.
76 {
77
79}
static int islower(int character)
Check if character is a lower-case letter.
static int isupper(int character)
Check if character is an upper-case letter.
References islower(), and isupper().
Referenced by getkey(), isalnum(), key_remap(), and parse_uri().
◆ isalnum()
| int isalnum |
( |
int | character | ) |
|
|
inlinestatic |
Check if character is alphanumeric.
- Parameters
-
- Return values
-
| is_alnum | Character is alphanumeric |
Definition at line 87 of file ctype.h.
87 {
88
90}
static int isdigit(int character)
Check if character is a decimal digit.
static int isalpha(int character)
Check if character is alphabetic.
References isalpha(), and isdigit().
Referenced by fdt_permitted().
◆ isprint()
| int isprint |
( |
int | character | ) |
|
|
inlinestatic |
◆ tolower()
| int tolower |
( |
int | character | ) |
|
|
inlinestatic |
◆ toupper()
| int toupper |
( |
int | character | ) |
|
|
inlinestatic |
◆ isspace()
| int isspace |
( |
int | character | ) |
|
|
extern |
Check to see if character is a space.
- Parameters
-
- Return values
-
| isspace | Character is a space |
Definition at line 42 of file ctype.c.
42 {
43
44 switch ( character ) {
45 case ' ' :
46 case '\f' :
47 case '\n' :
48 case '\r' :
49 case '\t' :
50 case '\v' :
51 return 1;
52 default:
53 return 0;
54 }
55}
Referenced by base64_decode(), cmdline_init(), efi_cmdline_init(), http_parse_header(), http_token(), image_argument(), peerdist_discovery_reply_values(), pnm_ascii(), pnm_probe(), previous_word(), process_script(), script_probe(), split_command(), strtoul_pre(), and syslog_fix_name().