We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e73e88f commit 2d3adc4Copy full SHA for 2d3adc4
code/include/swoc/TextView.h
@@ -911,11 +911,12 @@ class TextView : public std::string_view {
911
}
912
};
913
914
+ /// Support for containers that need case insensitive comparisons between views.
915
struct CaselessEqual {
- /// @return @c true if the strings are the same sans case.
916
+ /// @return @c true if the view contants are equal when compared without regard to case.
917
bool
918
operator()(self_type const& lhs, self_type const& rhs) const noexcept {
-
919
+ return lhs.size() == rhs.size() && 0 == strcasecmp(lhs, rhs);
920
921
922
0 commit comments