dbp::compare Class Reference

Case insensitive string comparing. More...

#include <strutils.h>

List of all members.

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.

Detailed Description

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)) {...};

Constructor & Destructor Documentation

dbp::compare::compare ( const std::locale &  L = std::locale::classic()  )  [inline]

Constructor.

Parameters:
L a locale of strings to compare (default: "C" locale)

Member Function Documentation

bool dbp::compare::operator() ( const std::string &  x,
const std::string &  y 
) const

Compare two strings.

Parameters:
x first string to compare
y second string to compare
Returns:
true, if x == y, or false otherwise

The documentation for this class was generated from the following file:

 
Support This Project
SourceForge.net Logo