From bc2101646bc6e63944c42500af5a15134b9b2d17 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 12 Apr 2023 10:50:46 +0200 Subject: loplugin:stringviewparam improvements improve the check by checking for methods that exclude using string_view, rather than checking for methods that __can__ use string_view, which leads to exposing some holes in our o3tl/string_view.hxx coverage. Change-Id: Ic9dd60441c671f502692f9cd2a1bb67301c4b960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150277 Tested-by: Jenkins Reviewed-by: Noel Grandin --- comphelper/source/misc/fileurl.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'comphelper') diff --git a/comphelper/source/misc/fileurl.cxx b/comphelper/source/misc/fileurl.cxx index 4f361ab4ba7a..2515b28c5b30 100644 --- a/comphelper/source/misc/fileurl.cxx +++ b/comphelper/source/misc/fileurl.cxx @@ -21,7 +21,11 @@ #include #include +#include -bool comphelper::isFileUrl(OUString const& url) { return url.startsWithIgnoreAsciiCase("file:"); } +bool comphelper::isFileUrl(std::u16string_view url) +{ + return o3tl::matchIgnoreAsciiCase(url, "file:"); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit