Group pj_ctype
- group pj_ctype
This module contains several inline functions/macros for testing or manipulating character types. It is provided in PJLIB because PJLIB must not depend to LIBC.
Defines
-
pj_hex_digits
Array of hex digits, in lowerspace.
Functions
-
int pj_isalnum(unsigned char c)
Returns a non-zero value if either isalpha or isdigit is true for c.
- Parameters:
c – The integer character to test.
- Returns:
Non-zero value if either isalpha or isdigit is true for c.
-
int pj_isalpha(unsigned char c)
Returns a non-zero value if c is a particular representation of an alphabetic character.
- Parameters:
c – The integer character to test.
- Returns:
Non-zero value if c is a particular representation of an alphabetic character.
-
int pj_isascii(unsigned char c)
Returns a non-zero value if c is a particular representation of an ASCII character.
- Parameters:
c – The integer character to test.
- Returns:
Non-zero value if c is a particular representation of an ASCII character.
-
int pj_isdigit(unsigned char c)
Returns a non-zero value if c is a particular representation of a decimal-digit character.
- Parameters:
c – The integer character to test.
- Returns:
Non-zero value if c is a particular representation of a decimal-digit character.
-
int pj_isspace(unsigned char c)
Returns a non-zero value if c is a particular representation of a space character (0x09 - 0x0D or 0x20).
- Parameters:
c – The integer character to test.
- Returns:
Non-zero value if c is a particular representation of a space character (0x09 - 0x0D or 0x20).
-
int pj_islower(unsigned char c)
Returns a non-zero value if c is a particular representation of a lowercase character.
- Parameters:
c – The integer character to test.
- Returns:
Non-zero value if c is a particular representation of a lowercase character.
-
int pj_isupper(unsigned char c)
Returns a non-zero value if c is a particular representation of a uppercase character.
- Parameters:
c – The integer character to test.
- Returns:
Non-zero value if c is a particular representation of a uppercase character.
-
int pj_isblank(unsigned char c)
Returns a non-zero value if c is a either a space (’ ‘) or horizontal tab (‘\t’) character.
- Parameters:
c – The integer character to test.
- Returns:
Non-zero value if c is a either a space (’ ‘) or horizontal tab (‘\t’) character.
-
int pj_tolower(unsigned char c)
Converts character to lowercase.
- Parameters:
c – The integer character to convert.
- Returns:
Lowercase character of c.
-
int pj_toupper(unsigned char c)
Converts character to uppercase.
- Parameters:
c – The integer character to convert.
- Returns:
Uppercase character of c.
-
int pj_isxdigit(unsigned char c)
Returns a non-zero value if c is a particular representation of an hexadecimal digit character.
- Parameters:
c – The integer character to test.
- Returns:
Non-zero value if c is a particular representation of an hexadecimal digit character.
-
void pj_val_to_hex_digit(unsigned value, char *p)
Convert a value to hex representation.
- Parameters:
value – Integral value to convert.
p – Buffer to hold the hex representation, which must be at least two bytes length.
-
unsigned pj_hex_digit_to_val(unsigned char c)
Convert hex digit c to integral value.
- Parameters:
c – The hex digit character.
- Returns:
The integral value between 0 and 15.
-
pj_hex_digits