Rudiments
character.h
1 // Copyright (c) 2004 David Muse
2 // See the COPYING file for more information.
3 
4 #ifndef RUDIMENTS_CHARACTER_H
5 #define RUDIMENTS_CHARACTER_H
6 
7 #include <rudiments/private/characterincludes.h>
8 
9 #ifdef RUDIMENTS_NAMESPACE
10 namespace rudiments {
11 #endif
12 
15 class RUDIMENTS_DLLSPEC character {
16  public:
19  static bool isAlphanumeric(int32_t c);
20 
23  static bool isAlphabetical(int32_t c);
24 
26  static bool isLowerCase(int32_t c);
27 
29  static bool isUpperCase(int32_t c);
30 
33  static bool isPunctuation(int32_t c);
34 
37  static bool isPrintable(int32_t c);
38 
41  static bool isPrintableNonSpace(int32_t c);
42 
45  static bool isControlCharacter(int32_t c);
46 
48  static bool isDigit(int32_t c);
49 
52  static bool isHexDigit(int32_t c);
53 
56  static bool isBlank(int32_t c);
57 
60  static bool isWhitespace(int32_t c);
61 
64  static bool isAscii(int32_t c);
65 
67  static int32_t toUpperCase(int32_t c);
68 
70  static int32_t toLowerCase(int32_t c);
71 
74  static int32_t toAscii(int32_t c);
75 
78  static bool inSet(char c, const char *set);
79 
82  static void safePrint(char c);
83 };
84 
85 #ifdef RUDIMENTS_NAMESPACE
86 }
87 #endif
88 
89 #endif