30 for (
int i=0; i <
size; i++) {
45 for (
int i=0; i <
size; i++) {
58 bool *bsetNew =
new bool[other.
size];
59 for (
int i = 0; i < other.
size; i++) {
60 bsetNew[i] = other.
bset[i];
91 for (
const char *cp=setToAdd; *cp; cp++) {
92 const unsigned char uch = *cp;
99 if (val < 0)
return false;
104 const unsigned char uch = ch;
112 return (ch ==
' ') || ((ch >= 0x09) && (ch <= 0x0d));
116 return (ch ==
' ') || (ch ==
'\t');
120 return (ch >=
'0') && (ch <=
'9');
125 return (ch >=
'0') && (ch <
'0' + base);
127 return ((ch >=
'0') && (ch <=
'9')) ||
128 ((ch >=
'A') && (ch <
'A' + base - 10)) ||
129 ((ch >=
'a') && (ch <
'a' + base - 10));
134 return (ch >= 0) && (ch < 0x80);
138 return (ch >=
'a') && (ch <=
'z');
142 return (ch >=
'A') && (ch <=
'Z');
151 ((ch >=
'0') && (ch <=
'9')) ||
152 ((ch >=
'a') && (ch <=
'z')) ||
153 ((ch >=
'A') && (ch <=
'Z'));
161 return (ch ==
' ') || ((ch >= 0x09) && (ch <= 0x0d));
175 if (ch ==
'%' || ch ==
'^' || ch ==
'&' || ch ==
'*' ||
176 ch ==
'(' || ch ==
')' || ch ==
'-' || ch ==
'+' ||
177 ch ==
'=' || ch ==
'|' || ch ==
'{' || ch ==
'}' ||
178 ch ==
'[' || ch ==
']' || ch ==
':' || ch ==
';' ||
179 ch ==
'<' || ch ==
'>' || ch ==
',' || ch ==
'/' ||
180 ch ==
'?' || ch ==
'!' || ch ==
'.' || ch ==
'~')
189 if (ch < 'a' || ch >
'z')
192 return ch -
'a' +
'A';
197 if (ch < 'A' || ch >
'Z')
200 return ch -
'A' +
'a';
void AddString(const char *setToAdd)
CharacterSet & operator=(CharacterSet &&other) noexcept
CharacterSet(setBase base=setNone, const char *initialSet="", int size_=0x80, bool valueAfter_=false)
bool Contains(char ch) const noexcept
CharacterSet & operator=(const CharacterSet &other)
bool Contains(int val) const noexcept
CharacterSet(const CharacterSet &other)
CharacterSet(CharacterSet &&other) noexcept
Styling buffer using one element for each run rather than using a filled buffer.
bool isoperator(int ch) noexcept
T MakeUpperCase(T ch) noexcept
constexpr bool IsASpace(int ch) noexcept
constexpr bool IsLowerCase(int ch) noexcept
constexpr bool IsASpaceOrTab(int ch) noexcept
constexpr bool IsAlphaNumeric(int ch) noexcept
int CompareNCaseInsensitive(const char *a, const char *b, size_t len) noexcept
constexpr bool IsASCII(int ch) noexcept
constexpr bool IsADigit(int ch) noexcept
constexpr bool IsUpperOrLowerCase(int ch) noexcept
constexpr bool iswordchar(int ch) noexcept
int CompareCaseInsensitive(const char *a, const char *b) noexcept
T MakeLowerCase(T ch) noexcept
constexpr bool isspacechar(int ch) noexcept
Check if a character is a space.
constexpr bool IsUpperCase(int ch) noexcept
constexpr bool iswordstart(int ch) noexcept