|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
-
-
- #ifndef Character_h
- #define Character_h
-
- #include <ctype.h>
-
-
- inline boolean isAlphaNumeric(int c) __attribute__((always_inline));
- inline boolean isAlpha(int c) __attribute__((always_inline));
- inline boolean isAscii(int c) __attribute__((always_inline));
- inline boolean isWhitespace(int c) __attribute__((always_inline));
- inline boolean isControl(int c) __attribute__((always_inline));
- inline boolean isDigit(int c) __attribute__((always_inline));
- inline boolean isGraph(int c) __attribute__((always_inline));
- inline boolean isLowerCase(int c) __attribute__((always_inline));
- inline boolean isPrintable(int c) __attribute__((always_inline));
- inline boolean isPunct(int c) __attribute__((always_inline));
- inline boolean isSpace(int c) __attribute__((always_inline));
- inline boolean isUpperCase(int c) __attribute__((always_inline));
- inline boolean isHexadecimalDigit(int c) __attribute__((always_inline));
- inline int toAscii(int c) __attribute__((always_inline));
- inline int toLowerCase(int c) __attribute__((always_inline));
- inline int toUpperCase(int c)__attribute__((always_inline));
-
-
-
-
- inline boolean isAlphaNumeric(int c)
- {
- return ( isalnum(c) == 0 ? false : true);
- }
-
-
-
-
- inline boolean isAlpha(int c)
- {
- return ( isalpha(c) == 0 ? false : true);
- }
-
-
-
-
- inline boolean isAscii(int c)
- {
- return ( isascii (c) == 0 ? false : true);
- }
-
-
-
- inline boolean isWhitespace(int c)
- {
- return ( isblank (c) == 0 ? false : true);
- }
-
-
-
- inline boolean isControl(int c)
- {
- return ( iscntrl (c) == 0 ? false : true);
- }
-
-
-
- inline boolean isDigit(int c)
- {
- return ( isdigit (c) == 0 ? false : true);
- }
-
-
-
- inline boolean isGraph(int c)
- {
- return ( isgraph (c) == 0 ? false : true);
- }
-
-
-
- inline boolean isLowerCase(int c)
- {
- return (islower (c) == 0 ? false : true);
- }
-
-
-
- inline boolean isPrintable(int c)
- {
- return ( isprint (c) == 0 ? false : true);
- }
-
-
-
-
- inline boolean isPunct(int c)
- {
- return ( ispunct (c) == 0 ? false : true);
- }
-
-
-
-
-
- inline boolean isSpace(int c)
- {
- return ( isspace (c) == 0 ? false : true);
- }
-
-
-
- inline boolean isUpperCase(int c)
- {
- return ( isupper (c) == 0 ? false : true);
- }
-
-
-
-
- inline boolean isHexadecimalDigit(int c)
- {
- return ( isxdigit (c) == 0 ? false : true);
- }
-
-
-
-
- inline int toAscii(int c)
- {
- return toascii (c);
- }
-
-
-
-
-
-
-
-
- inline int toLowerCase(int c)
- {
- return tolower (c);
- }
-
-
-
- inline int toUpperCase(int c)
- {
- return toupper (c);
- }
-
- #endif
|