mirror of
https://github.com/a2x/cs2-dumper.git
synced 2026-04-17 16:39:58 +08:00
Refactored code
This commit is contained in:
12
include/utility/string.hpp
Normal file
12
include/utility/string.hpp
Normal 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);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user