Return whether two strings have the same value.
Declared in <bslstl_string.h>
template<
class CHAR_TYPE,
class CHAR_TRAITS,
class ALLOC>
bool
operator==(
basic_string<CHAR_TYPE, CHAR_TRAITS, ALLOC> const& lhs,
CHAR_TYPE const* rhs);
Return true if the specified lhs string has the same value as the specified rhs string, and false otherwise. Two strings have the same value if they have the same length, and the characters at each respective position have the same value according to CHAR_TRAITS::eq.
true if the strings compare equal
| Name | Description |
|---|---|
| lhs | left-hand operand |
| rhs | right-hand operand |