lib/icu/CaseFold: pass std::string_view

This commit is contained in:
Max Kellermann
2020-04-03 15:38:26 +02:00
parent 09d8e44d56
commit e620677d7c
5 changed files with 9 additions and 13 deletions

View File

@@ -45,14 +45,9 @@
#include <string.h>
AllocatedString<>
IcuCaseFold(const char *src) noexcept
IcuCaseFold(std::string_view src) noexcept
try {
#ifdef HAVE_ICU
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
assert(src != nullptr);
#endif
const auto u = UCharFromUTF8(src);
if (u.IsNull())
return AllocatedString<>::Duplicate(src);