Functor object used to compare characters either case sensitively or or insentively. More...
#include <strtool.h>
Public Member Functions | |
CharCompare (bool caseInsensitive) | |
bool | operator() (char a, char b) const |
Public Attributes | |
bool | insensitive_ |
Functor object used to compare characters either case sensitively or or insentively.
Use this class like this:
CharCompare comparator(true); // case insensitive comparisons
bool equal = comparator('a', 'A');
char const *first="abc"; char const *second="BC";
char const *bc = std::search(first, first+3, second, second+3, comparator);
The pointer, bc, now points to the "bc" in first.
Definition at line 607 of file strtool.h.
CharCompare | ( | bool | caseInsensitive | ) |
bool insensitive_ |