UCB: Simplify ucb_impl::Regexp rtl/character.hxx usage.
Change-Id: I2298732602ad6f5acc040673f550040802ec580c
Reviewed-on: https://gerrit.libreoffice.org/26328
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
diff --git a/ucb/source/regexp/regexp.cxx b/ucb/source/regexp/regexp.cxx
index fae2aee..28e5940 100644
--- a/ucb/source/regexp/regexp.cxx
+++ b/ucb/source/regexp/regexp.cxx
@@ -67,13 +67,7 @@ bool matchStringIgnoreCase(sal_Unicode const ** pBegin,
while (q != qEnd)
{
sal_Unicode c1 = *p++;
sal_Unicode c2 = *q++;
if (c1 >= 'a' && c1 <= 'z')
c1 -= 'a' - 'A';
if (c2 >= 'a' && c2 <= 'z')
c2 -= 'a' - 'A';
if (c1 != c2)
if (rtl::compareIgnoreAsciiCase(*p++, *q++) != 0)
return false;
}
@@ -183,7 +177,7 @@ bool isScheme(OUString const & rString, bool bColon)
if (p == pEnd)
return !bColon;
sal_Unicode c = *p++;
if (!(rtl::isAsciiAlpha(c) || rtl::isAsciiDigit(c)
if (!(rtl::isAsciiAlphanumeric(c)
|| c == '+' || c == '-' || c == '.'))
return bColon && c == ':' && p == pEnd;
}