Compares a string, substring or Null Terminated Character Type Sequence with a lexicographical comparison.
int compare(const basic_string& str) const; int compare( size_type pos1, size_type n1, const basic_string& str) const; int compare (size_type pos1, size_type n1, const basic_string& str, size_type pos2, size_type n2) const; int compare(const charT* s) const; int compare (size_type pos1, size_type n1, const charT* s, size_type n2 = npos) const;
Less than zero if the string is smaller than the argument lexicographically, zero if the string is the same size as the argument lexicographically and greater than zero if the string is larger than the argument lexicographically.