15const char*
matchArray(
const char* pSource, sal_Int32 nSourceSize,
const char* pSearch,
16 sal_Int32 nSearchSize)
18 for (sal_Int32 increment = 0; increment <= (nSourceSize - nSearchSize); ++increment)
37 return matchArray(pSource, nSourceSize, rString.getStr(), rString.getLength());
41 std::vector<OString>
const& rStrings)
45 if (rStrings.size() < 2)
48 const char* pBegin = pSource;
49 const char* pCurrent = pSource;
50 for (OString
const& rString : rStrings)
52 sal_Int32 nCurrentSize = nSourceSize - sal_Int32(pCurrent - pBegin);
53 pCurrent =
matchArray(pCurrent, nCurrentSize, rString.getStr(), rString.getLength());
54 if (pCurrent ==
nullptr)
const char * matchArray(const char *pSource, sal_Int32 nSourceSize, const char *pSearch, sal_Int32 nSearchSize)
bool checkArrayForMatchingStrings(const char *pSource, sal_Int32 nSourceSize, std::vector< OString > const &rStrings)
const char * matchArrayWithString(const char *pSource, sal_Int32 nSourceSize, OString const &rString)