NEXUS CLASS LIBRARY: NStrCaseInsensitiveEquals Class

NEXUS CLASS LIBRARY | home | classes | functions

# Class NStrCaseInsensitiveEquals

## Data Members

compStr

## Member Functions

NStrCaseInsensitiveEquals, operator()

## Class Description

Function object (Unary Predicate functor) that stores one string. The ()(const NxsString &) operator then returns the result of a case-insensitive compare. Useful for STL find algorithms. Could be made faster than sequential case insenstive comparisons, because the string stored in the object is just capitalized once.

### Key to symbols and colors

public, protected, private, `A` = abstract, `C` = constructor, `D` = destructor, `I` = inline, `S` = static, `V` = virtual, `F` = friend

Data Members

|  | `NxsString` |  | `compStr`

Member Functions

CI |  | `` |  | `NStrCaseInsensitiveEquals``(const NxsString &s)`
|  |  |  | Creates a function object for case-insensitive comparisons of s to a container of strings.
I |  | `bool` |  | `operator()``(const NxsString &s)`
|  |  |  | Returns the result of a case-sensitive compare of s and the string stored when the NStrCaseInsensitiveEquals object was created. Could be made more efficient (currently capitalizes the entire argument even though the first character may be wrong).