Name

operator<= function template — Compares strings for less-than-or-equal

Synopsis

template<class charT, class traits, class Allocator>
  bool operator<=(
    const basic_string<charT,traits,Allocator>& a,
    const basic_string<charT,traits,Allocator>& b);
// bool operator<=(const string& a, const string& b);
template<class charT, class traits, class Allocator>
  bool operator<=(const charT* a, const basic_string<charT,traits,Allocator>& b);
// bool operator<=(const char* a, const string& b);
template<class charT, class traits, class Allocator>
  bool operator<=(const basic_string<charT,traits,Allocator>& a, const charT* b);
// bool operator<=(const string& a, conat char* b);

The <= operator compares two strings or compares a string and a null-terminated character array. It returns a.compare(b) <= 0, converting a or b from a character array to a string, as needed.