removing files that got added by rebase

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> (+1 squashed commits)

Squashed commits:

[a19269426] fixing more strings

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> (+1 squashed commits)

Squashed commits:

[d2a049324] fixing more strings

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> (+1 squashed commits)

Squashed commits:

[a1ff4c101] trying to build

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
pappeste
2021-06-23 14:52:30 -07:00
committed by Esteban Papp
parent 433aec4f34
commit 9c72510a4f
78 changed files with 330 additions and 7193 deletions
-120
View File
@@ -380,126 +380,6 @@ bool StringHelpers::ContainsIgnoreCase(const wstring& str, const wstring& patter
return false;
}
bool StringHelpers::MatchesWildcards(const string& str, const string& wildcards)
{
using namespace CryStringUtils_Internal;
return MatchesWildcards_Tpl<SCharComparatorCaseSensitive>(str.c_str(), wildcards.c_str());
}
bool StringHelpers::MatchesWildcards(const wstring& str, const wstring& wildcards)
{
using namespace CryStringUtils_Internal;
return MatchesWildcards_Tpl<SCharComparatorCaseSensitive>(str.c_str(), wildcards.c_str());
}
bool StringHelpers::MatchesWildcardsIgnoreCase(const string& str, const string& wildcards)
{
using namespace CryStringUtils_Internal;
return MatchesWildcards_Tpl<SCharComparatorCaseInsensitive>(str.c_str(), wildcards.c_str());
}
bool StringHelpers::MatchesWildcardsIgnoreCase(const wstring& str, const wstring& wildcards)
{
using namespace CryStringUtils_Internal;
return MatchesWildcards_Tpl<SCharComparatorCaseInsensitive>(str.c_str(), wildcards.c_str());
}
template <class TS>
static inline bool MatchesWildcardsIgnoreCaseExt_Tpl(const TS& str, const TS& wildcards, std::vector<TS>& wildcardMatches)
{
const typename TS::value_type* savedStrBegin = 0;
const typename TS::value_type* savedStrEnd = 0;
const typename TS::value_type* savedWild = 0;
size_t savedWildCount = 0;
const typename TS::value_type* pStr = str.c_str();
const typename TS::value_type* pWild = wildcards.c_str();
size_t wildCount = 0;
while ((*pStr) && (*pWild != '*'))
{
if (*pWild == '?')
{
wildcardMatches.push_back(TS(pStr, pStr + 1));
++wildCount;
}
else if (ToLower(*pWild) != ToLower(*pStr))
{
wildcardMatches.resize(wildcardMatches.size() - wildCount);
return false;
}
++pWild;
++pStr;
}
while (*pStr)
{
if (*pWild == '*')
{
if (!pWild[1])
{
wildcardMatches.push_back(TS(pStr));
return true;
}
savedWild = pWild++;
savedStrBegin = pStr;
savedStrEnd = pStr;
savedWildCount = wildCount;
wildcardMatches.push_back(TS(savedStrBegin, savedStrEnd));
++wildCount;
}
else if (*pWild == '?')
{
wildcardMatches.push_back(TS(pStr, pStr + 1));
++wildCount;
++pWild;
++pStr;
}
else if (ToLower(*pWild) == ToLower(*pStr))
{
++pWild;
++pStr;
}
else
{
wildcardMatches.resize(wildcardMatches.size() - (wildCount - savedWildCount));
wildCount = savedWildCount;
++savedStrEnd;
pWild = savedWild + 1;
pStr = savedStrEnd;
wildcardMatches.push_back(TS(savedStrBegin, savedStrEnd));
++wildCount;
}
}
while (*pWild == '*')
{
++pWild;
wildcardMatches.push_back(TS());
++wildCount;
}
if (*pWild)
{
wildcardMatches.resize(wildcardMatches.size() - wildCount);
return false;
}
return true;
}
bool StringHelpers::MatchesWildcardsIgnoreCaseExt(const string& str, const string& wildcards, std::vector<string>& wildcardMatches)
{
return MatchesWildcardsIgnoreCaseExt_Tpl(str, wildcards, wildcardMatches);
}
bool StringHelpers::MatchesWildcardsIgnoreCaseExt(const wstring& str, const wstring& wildcards, std::vector<wstring>& wildcardMatches)
{
return MatchesWildcardsIgnoreCaseExt_Tpl(str, wildcards, wildcardMatches);
}
string StringHelpers::TrimLeft(const string& s)
{
const size_t first = s.find_first_not_of(" \r\t");