Refactored code

This commit is contained in:
a2x
2023-09-16 13:32:01 +10:00
parent a3a3427561
commit a8d3318d94
58 changed files with 787 additions and 635 deletions

View File

@@ -0,0 +1,12 @@
#pragma once
#include <cctype>
#include <string_view>
namespace utility::string {
inline bool equals_ignore_case(const std::string_view str_1, const std::string_view str_2) noexcept {
return (str_1.size() == str_2.size()) && std::equal(str_1.begin(), str_1.end(), str_2.begin(), [](const char a, const char b) {
return std::tolower(a) == std::tolower(b);
});
}
}