Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

ctype.h File Reference


Detailed Description

IPRT - ctype.h wrapper and C locale variants.

Definition in file ctype.h.

Go to the source code of this file.

Defines

C locale macros.
Remarks:
The macros may reference the character more than once.

Assumes a charset similar to ASCII.

Can probably be optimized if someone has time.



#define RT_C_IS_ALNUM(ch)   ( RT_C_IS_DIGIT(ch) || RT_C_IS_ALPHA(ch) )
#define RT_C_IS_ALPHA(ch)   ( RT_C_IS_LOWER(ch) || RT_C_IS_UPPER(ch) )
#define RT_C_IS_BLANK(ch)   ( (ch) == ' ' || (ch) == '\t' )
#define RT_C_IS_CNTRL(ch)   ( (ch) >= 0 && (ch) < 32 )
#define RT_C_IS_DIGIT(ch)   ( (ch) >= '0' && (ch) <= '9' )
#define RT_C_IS_GRAPH(ch)   ( RT_C_IS_PRINT(ch) && !RT_C_IS_BLANK(ch) )
#define RT_C_IS_LOWER(ch)   ( (ch) >= 'a' && (ch) <= 'z' )
#define RT_C_IS_ODIGIT(ch)   ( (ch) >= '0' && (ch) <= '7' )
#define RT_C_IS_PRINT(ch)   ( (ch) >= 32 && (ch) < 127 )
#define RT_C_IS_PUNCT(ch)   ( (ch) == ',' || (ch) == '.' || (ch) == ':' || (ch) == ';' || (ch) == '!' || (ch) == '?' )
#define RT_C_IS_SPACE(ch)   ( (ch) == ' ' || (ch) == '\t' || (ch) == '\n' || (ch) == '\r' || (ch) == '\f' || (ch) == '\v' )
#define RT_C_IS_UPPER(ch)   ( (ch) >= 'A' && (ch) <= 'Z' )
#define RT_C_IS_XDIGIT(ch)   ( RT_C_IS_DIGIT(ch) || ((ch) >= 'a' && (ch) <= 'f') || ((ch) >= 'A' && (ch) <= 'F') )
#define RT_C_TO_LOWER(ch)   ( RT_C_IS_UPPER(ch) ? (ch) + ('a' - 'A') : (ch) )
#define RT_C_TO_UPPER(ch)   ( RT_C_IS_LOWER(ch) ? (ch) - ('a' - 'A') : (ch) )


Generated by  Doxygen 1.6.0   Back to index