Static Public Member Functions | Static Private Member Functions | List of all members
util::details::CaseInsensitiveComparer Struct Reference

#include <MultipleChoiceSelection.h>

Static Public Member Functions

static bool equal (std::string const &a, std::string const &b)
 Returns whether strings a and b are equal. More...
 
static bool less (std::string const &a, std::string const &b)
 Returns whether a is lexicographically smaller than b. More...
 

Static Private Member Functions

static bool cmp_lower (unsigned char a, unsigned char b)
 
static bool eq_lower (unsigned char a, unsigned char b)
 

Detailed Description

Definition at line 35 of file MultipleChoiceSelection.h.

Member Function Documentation

bool util::details::CaseInsensitiveComparer::cmp_lower ( unsigned char  a,
unsigned char  b 
)
staticprivate

Definition at line 561 of file MultipleChoiceSelection.h.

562  { return std::tolower(a) < std::tolower(b); }
const double a
static bool * b
Definition: config.cpp:1043
bool util::details::CaseInsensitiveComparer::eq_lower ( unsigned char  a,
unsigned char  b 
)
staticprivate

Definition at line 567 of file MultipleChoiceSelection.h.

568  { return std::tolower(a) == std::tolower(b); }
const double a
static bool * b
Definition: config.cpp:1043
bool util::details::CaseInsensitiveComparer::equal ( std::string const &  a,
std::string const &  b 
)
static

Returns whether strings a and b are equal.

Definition at line 546 of file MultipleChoiceSelection.h.

547  { return std::equal(a.begin(), a.end(), b.begin(), b.end(), eq_lower); }
static bool eq_lower(unsigned char a, unsigned char b)
const double a
static bool * b
Definition: config.cpp:1043
bool util::details::CaseInsensitiveComparer::less ( std::string const &  a,
std::string const &  b 
)
static

Returns whether a is lexicographically smaller than b.

Definition at line 552 of file MultipleChoiceSelection.h.

553 {
554  return std::lexicographical_compare
555  (a.begin(), a.end(), b.begin(), b.end(), cmp_lower);
556 } // util::details::CaseInsensitiveComparer::less()
static bool cmp_lower(unsigned char a, unsigned char b)
const double a
static bool * b
Definition: config.cpp:1043

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