CharacterSet.h
Go to the documentation of this file.
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 &, const CharacterSet &)
Definition: CharacterSet.cc:131
optimized set of C chars, with quick membership test and merge support
Definition: CharacterSet.h:18
bool operator[](unsigned char c) const
whether a given character exists in the set
Definition: CharacterSet.h:39
CharacterSet complement(const char *complementLabel=nullptr) const
Definition: CharacterSet.cc:74
CharacterSet & rename(const char *label)
change name; handy in const declarations that use operators
Definition: CharacterSet.h:61
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