Rudiments
|
00001 // Copyright (c) 2004 David Muse 00002 // See the COPYING file for more information. 00003 00004 #ifndef RUDIMENTS_CHARACTER_H 00005 #define RUDIMENTS_CHARACTER_H 00006 00007 #include <rudiments/private/characterincludes.h> 00008 00009 #ifdef RUDIMENTS_NAMESPACE 00010 namespace rudiments { 00011 #endif 00012 00015 class RUDIMENTS_DLLSPEC character { 00016 public: 00019 static bool isAlphanumeric(int32_t c); 00020 00023 static bool isAlphabetical(int32_t c); 00024 00026 static bool isLowerCase(int32_t c); 00027 00029 static bool isUpperCase(int32_t c); 00030 00033 static bool isPunctuation(int32_t c); 00034 00037 static bool isPrintable(int32_t c); 00038 00041 static bool isPrintableNonSpace(int32_t c); 00042 00045 static bool isControlCharacter(int32_t c); 00046 00048 static bool isDigit(int32_t c); 00049 00052 static bool isHexDigit(int32_t c); 00053 00056 static bool isBlank(int32_t c); 00057 00060 static bool isWhitespace(int32_t c); 00061 00064 static bool isAscii(int32_t c); 00065 00067 static int32_t toUpperCase(int32_t c); 00068 00070 static int32_t toLowerCase(int32_t c); 00071 00074 static int32_t toAscii(int32_t c); 00075 00078 static bool inSet(char c, const char *set); 00079 00082 static void safePrint(char c); 00083 }; 00084 00085 #ifdef RUDIMENTS_NAMESPACE 00086 } 00087 #endif 00088 00089 #endif