mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-25 03:11:58 +01:00
Compare strings case insensitive.
This commit is contained in:
parent
a349af207d
commit
a5dd7d7df1
@ -470,7 +470,14 @@ static inline bool IsFileSupported(const char *File, const vector<string>& FileT
|
|||||||
for (auto & fileType : FileTypes)
|
for (auto & fileType : FileTypes)
|
||||||
{
|
{
|
||||||
if (fileName.length() >= fileType.length() &&
|
if (fileName.length() >= fileType.length() &&
|
||||||
fileName.ends_with(fileType))
|
std::equal(fileName.end() - fileType.length(),
|
||||||
|
fileName.end(), fileType.begin(),
|
||||||
|
[](const char & c1, const char & c2)
|
||||||
|
{
|
||||||
|
return (c1 == c2 ||
|
||||||
|
std::toupper(c1) ==
|
||||||
|
std::toupper(c2));
|
||||||
|
}))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user