BloombergLP::bslstl::StringRefImp::compare

Lexicographically compare this string with other.

Synopsis

Declared in <bslstl_stringref.h>

int
compare(StringRefImp const& other) const;

Description

Compare this and the specified other string objects using a lexicographical comparison and return a negative value if this string is less than other string, a positive value if this string is greater than other string, and 0 if this string is equal to other string.

Return Value

negative, zero, or positive comparison result

Parameters

NameDescription
otherstring reference to compare against