Case insensitive string comparing. More...
#include <strutils.h>
Public Member Functions | |
| compare (const std::locale &L=std::locale::classic()) | |
| Constructor. | |
| bool | operator() (const std::string &x, const std::string &y) const |
| Compare two strings. | |
Case insensitive string comparing.
The compare functor class is used for case insensitive comparing of two strings, with optionally provided locale, for example:
if (compare()(s1, s2)) {...};
| dbp::compare::compare | ( | const std::locale & | L = std::locale::classic() |
) | [inline] |
Constructor.
| L | a locale of strings to compare (default: "C" locale) |
| bool dbp::compare::operator() | ( | const std::string & | x, | |
| const std::string & | y | |||
| ) | const |
Compare two strings.
| x | first string to compare | |
| y | second string to compare |