10 #ifndef stk_util_string_case_compare_hpp 11 #define stk_util_string_case_compare_hpp 28 {
return strcasecmp( lhs , rhs ) == 0 ; }
33 {
return strcasecmp( lhs , rhs ) != 0 ; }
37 bool less_case(
const char * lhs ,
const char * rhs )
38 {
return strcasecmp( lhs , rhs ) < 0 ; }
43 {
return strcasecmp( lhs , rhs ) <= 0 ; }
48 {
return strcasecmp( lhs , rhs ) > 0 ; }
53 {
return strcasecmp( lhs , rhs ) >= 0 ; }
59 bool equal_case(
const std::string & lhs ,
const std::string & rhs )
60 {
return strcasecmp( lhs.c_str() , rhs.c_str() ) == 0 ; }
65 {
return strcasecmp( lhs.c_str() , rhs.c_str() ) != 0 ; }
69 bool less_case(
const std::string & lhs ,
const std::string & rhs )
70 {
return strcasecmp( lhs.c_str() , rhs.c_str() ) < 0 ; }
75 {
return strcasecmp( lhs.c_str() , rhs.c_str() ) <= 0 ; }
79 bool greater_case(
const std::string & lhs ,
const std::string & rhs )
80 {
return strcasecmp( lhs.c_str() , rhs.c_str() ) > 0 ; }
85 {
return strcasecmp( lhs.c_str() , rhs.c_str() ) >= 0 ; }
90 struct EqualCase :
public std::binary_function<std::string,std::string,bool> {
92 bool operator()(
const std::string & lhs ,
const std::string & rhs )
const 97 struct NotEqualCase :
public std::binary_function<std::string,std::string,bool> {
99 bool operator()(
const std::string & lhs ,
const std::string & rhs )
const 104 struct LessCase :
public std::binary_function<std::string,std::string,bool> {
106 bool operator()(
const std::string & lhs ,
const std::string & rhs )
const 111 struct LessEqualCase :
public std::binary_function<std::string,std::string,bool> {
113 bool operator()(
const std::string & lhs ,
const std::string & rhs )
const 118 struct GreaterCase :
public std::binary_function<std::string,std::string,bool> {
120 bool operator()(
const std::string & lhs ,
const std::string & rhs )
const 127 bool operator()(
const std::string & lhs ,
const std::string & rhs )
const Case-insensitive less-than-or-equal-to compare binary function object.
bool greater_equal_case(const char *lhs, const char *rhs)
Case-insensitive greater-than-or-equal-to compare.
bool greater_case(const char *lhs, const char *rhs)
Case-insensitive greater-than compare.
Case-insensitive less-than compare binary function object.
Case-insensitive equality compare binary function object.
bool not_equal_case(const char *lhs, const char *rhs)
Case-insensitive inequality compare.
bool operator()(const std::string &lhs, const std::string &rhs) const
Case-insensitive greater-than-or-equal-to compare binary function object.
Case-insensitive greater-than-or-equal-to compare binary function object.
Case-insensitive inequality compare binary function object.
bool less_equal_case(const char *lhs, const char *rhs)
Case-insensitive less-than-or-equal-to compare.
bool operator()(const std::string &lhs, const std::string &rhs) const
Case-insensitive inequality compare binary function object.
Case-insensitive greater-than compare binary function object.
bool less_case(const char *lhs, const char *rhs)
Case-insensitive less-than compare.
bool operator()(const std::string &lhs, const std::string &rhs) const
Case-insensitive less-than-or-equal-to compare binary function object.
bool equal_case(const char *lhs, const char *rhs)
Case-insensitive equality compare.
bool operator()(const std::string &lhs, const std::string &rhs) const
Case-insensitive equality compare binary function object.
bool operator()(const std::string &lhs, const std::string &rhs) const
Case-insensitive greater-than compare binary function object.
bool operator()(const std::string &lhs, const std::string &rhs) const
Case-insensitive less-than compare binary function object.