Make extension checks case-insensitive (#273)

## Summary

* Implement new `StringUtils::checkFileExtension` which does case
insensitive checking
* Move all checks over to this
This commit is contained in:
Dave Allie
2026-01-07 20:07:23 +10:00
committed by GitHub
parent 0cc2c64df2
commit 46fa186b82
7 changed files with 38 additions and 34 deletions

View File

@@ -1,4 +1,5 @@
#pragma once
#include <string>
namespace StringUtils {
@@ -10,4 +11,9 @@ namespace StringUtils {
*/
std::string sanitizeFilename(const std::string& name, size_t maxLength = 100);
/**
* Check if the given filename ends with the specified extension (case-insensitive).
*/
bool checkFileExtension(const std::string& fileName, const char* extension);
} // namespace StringUtils