bsl::basic_string::compare

Lexicographically compare this string with another sequence.

Synopsis

Declared in <bslstl_string.h>

int
compare(basic_string const& other) const noexcept;

Return Value

negative, zero, or positive according to the lexicographic order

Parameters

NameDescription
otherstring or character sequence to compare or use