diff --git a/comphelper/source/misc/servicedecl.cxx b/comphelper/source/misc/servicedecl.cxx index 5f691014d39c..2b16539d1a55 100644 --- a/comphelper/source/misc/servicedecl.cxx +++ b/comphelper/source/misc/servicedecl.cxx @@ -131,7 +131,7 @@ bool ServiceDecl::supportsService( std::u16string_view name ) const sal_Int32 nIndex = 0; do { std::string_view const token( o3tl::getToken(str, 0, cDelim, nIndex ) ); - if (o3tl::equalsAsciiL(name, token)) + if (o3tl::equalsAscii(name, token)) return true; } while (nIndex >= 0); diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx index b49c5eebfc15..b270c62c5cb4 100644 --- a/cppuhelper/source/shlib.cxx +++ b/cppuhelper/source/shlib.cxx @@ -57,7 +57,7 @@ css::uno::Environment cppuhelper::detail::getEnvironment( for (sal_Int32 i = 0; i != -1;) { std::string_view imp(o3tl::getToken(imps, 0, ';', i)); //TODO: this assumes UNO_ENV_LOG only contains ASCII characters: - if (o3tl::equalsAsciiL(implementation, imp)) + if (o3tl::equalsAscii(implementation, imp)) { n += ":log"; break; diff --git a/include/o3tl/string_view.hxx b/include/o3tl/string_view.hxx index 79d6eba702a1..2ccc4f828a03 100644 --- a/include/o3tl/string_view.hxx +++ b/include/o3tl/string_view.hxx @@ -22,7 +22,7 @@ namespace o3tl { -// Like OUString::equalsAscii, but for std::u16string_view: +// Like OUString::equalsAscii/OUString::equalsAsciiL, but for std::u16string_view: inline bool equalsAscii(std::u16string_view s1, std::string_view s2) { return s1.size() == s2.size() @@ -30,13 +30,6 @@ inline bool equalsAscii(std::u16string_view s1, std::string_view s2) == 0; } -// Like OUString::equalsAsciiL, but for std::u16string_view: -inline bool equalsAsciiL(std::u16string_view s1, std::string_view s2) -{ - return rtl_ustr_ascii_shortenedCompare_WithLength(s1.data(), s1.size(), s2.data(), s2.size()) - == 0; -} - // Like OUString::equalsIgnoreAsciiCase, but for two std::u16string_view: inline bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2) {