32 const sal_Unicode* pWildEnd = aWild.data() + aWild.size();
36 while (pWild != pWildEnd)
41 if ( pStr == pStrEnd )
45 if ((pWild + 1 != pWildEnd) && ((*(pWild + 1) ==
'?') || (*(pWild + 1) ==
'*')))
53 if (!pPosAfterAsterisk)
55 pWild = pPosAfterAsterisk;
58 while ( pWild != pWildEnd && *pWild ==
'*' )
60 if ( pWild == pWildEnd )
69 while (pWild != pWildEnd && *pWild ==
'*')
71 if (pWild == pWildEnd)
75 if ( pStr == pStrEnd )
77 pPosAfterAsterisk = pWild;
78 if ((*pWild ==
'\\') && (pWild + 1 != pWildEnd) && ((*(pWild + 1) ==
'?') || (*(pWild + 1) ==
'*')))
80 while (*pStr != *pWild)
83 if ( pStr == pStrEnd )
89 assert(pWild != pWildEnd);
91 assert(pStr != pStrEnd);
93 if (pWild == pWildEnd && pPosAfterAsterisk && pStr != pStrEnd)
94 pWild = pPosAfterAsterisk;
96 assert(pWild == pWildEnd);
97 return pStr == pStrEnd;
108 while ( (nSepPos = aTmpWild.find(
cSepSymbol)) != std::u16string_view::npos )
111 if (
ImpMatch( aTmpWild.substr( 0, nSepPos ), rString ) )
113 aTmpWild = aTmpWild.substr(nSepPos + 1);
117 return ImpMatch( aTmpWild, rString );
bool Matches(std::u16string_view rStr) const
static bool ImpMatch(std::u16string_view aWild, std::u16string_view aStr)
Tests, whether a wildcard in pWild will match for pStr.