CharacterSet.cc
Go to the documentation of this file.
99CharacterSet::CharacterSet(const char *label, std::initializer_list<std::pair<uint8_t, uint8_t>> ranges) :
130std::ostream&
153CharacterSet::TCHAR("TCHAR","!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"),
160CharacterSet::TOKEN68C("TOKEN68C","-._~+/0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
CharacterSet operator+(CharacterSet lhs, const CharacterSet &rhs)
Definition: CharacterSet.cc:117
CharacterSet operator-(CharacterSet lhs, const CharacterSet &rhs)
Definition: CharacterSet.cc:124
std::ostream & operator<<(std::ostream &s, const CharacterSet &c)
Definition: CharacterSet.cc:131
optimized set of C chars, with quick membership test and merge support
Definition: CharacterSet.h:18
CharacterSet complement(const char *complementLabel=nullptr) const
Definition: CharacterSet.cc:74
CharacterSet & operator-=(const CharacterSet &rhs)
set subtraction: remove all characters that are also in rhs
Definition: CharacterSet.cc:32
CharacterSet & addRange(unsigned char low, unsigned char high)
add a list of character ranges, expressed as pairs [low,high], including both ends
Definition: CharacterSet.cc:61
CharacterSet & add(const unsigned char c)
add a given character to the character set
Definition: CharacterSet.cc:47
CharacterSet(const char *label="anonymous", const char *const chars="")
a character set with a given label and contents
Definition: CharacterSet.cc:83
CharacterSet & operator+=(const CharacterSet &rhs)
set addition: add to this set all characters that are also in rhs
Definition: CharacterSet.cc:17
const char * name
optional set label for debugging (default: "anonymous")
Definition: CharacterSet.h:72
CharacterSet & remove(const unsigned char c)
remove a given character from the character set
Definition: CharacterSet.cc:54
void printChars(std::ostream &os) const
prints all chars in arbitrary order, without any quoting/escaping
Definition: CharacterSet.cc:108