lib/icu/Compare: use StringIsEqualIgnoreCase()

This commit is contained in:
Max Kellermann 2019-07-05 09:59:53 +02:00
parent 0a267056d3
commit 9cdebc90a0
1 changed files with 1 additions and 3 deletions

View File

@ -22,8 +22,6 @@
#include "util/StringAPI.hxx" #include "util/StringAPI.hxx"
#include "config.h" #include "config.h"
#include <string.h>
#ifdef HAVE_ICU_CASE_FOLD #ifdef HAVE_ICU_CASE_FOLD
IcuCompare::IcuCompare(const char *_needle) noexcept IcuCompare::IcuCompare(const char *_needle) noexcept
@ -42,7 +40,7 @@ IcuCompare::operator==(const char *haystack) const noexcept
#ifdef HAVE_ICU_CASE_FOLD #ifdef HAVE_ICU_CASE_FOLD
return StringIsEqual(IcuCaseFold(haystack).c_str(), needle.c_str()); return StringIsEqual(IcuCaseFold(haystack).c_str(), needle.c_str());
#else #else
return strcasecmp(haystack, needle.c_str()); return StringIsEqualIgnoreCase(haystack, needle.c_str());
#endif #endif
} }