Lexicographically compare this string with another sequence.
Declared in <bslstl_string.h>
template<class STRING_VIEW_LIKE_TYPE>
int
compare(
size_type lhsPosition,
size_type lhsNumChars,
STRING_VIEW_LIKE_TYPE const& other,
size_type otherPosition,
size_type otherNumChars = npos) const;
negative, zero, or positive according to the lexicographic order
| Name | Description |
|---|---|
| lhsPosition | starting index of the left-hand substring |
| lhsNumChars | length of the left-hand substring |
| other | string or character sequence to compare or use |
| otherPosition | starting index in the other string |
| otherNumChars | length of the other substring |