CharCompare Struct Reference

Functor object used to compare characters either case sensitively or or insentively. More...

#include <strtool.h>

List of all members.

Public Member Functions

 CharCompare (bool caseInsensitive)
bool operator() (char a, char b) const

Public Attributes

bool insensitive_

Detailed Description

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.


Constructor & Destructor Documentation

CharCompare ( bool  caseInsensitive  ) 

Definition at line 642 of file strtool.h.


Member Function Documentation

bool operator() ( char  a,
char  b 
) const

Definition at line 626 of file strtool.h.


Member Data Documentation

Definition at line 624 of file strtool.h.


The documentation for this struct was generated from the following file:
Generated on Wed Feb 29 22:56:45 2012 for CXXUtilities by  doxygen 1.6.3