bsl::basic_string<wchar_t>::compare

Lexicographically compare the substring of this string of the specified numChars length starting at the specified position (or the suffix of this string starting at position if position + numChars > length()) with the specified other, and return a negative value if the indicated substring of this string is less than other, a positive value if it is greater than other, and 0 in case of equality. CHAR_TRAITS::lt is used to compare characters. See {Lexicographical Comparisons}. Throw out_of_range if position > length().

Synopsis

Declared in <bslstl_string.h>

template<class STRING_VIEW_LIKE_TYPE>
int
compare(
    size_type position,
    size_type numChars,
    STRING_VIEW_LIKE_TYPE const& other) const;