diff options
| author | Shauren <shauren.trinity@gmail.com> | 2025-11-15 11:42:30 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2025-11-15 11:42:30 +0100 |
| commit | 21ff7f250366220e31feb79d30c2e5aa20832d50 (patch) | |
| tree | 79eb78f98eaa122b1643fd57dee0afcd545fe7ba /src/common/Utilities/Util.h | |
| parent | a8dd7dcf0e92addf21667e92ab7609cd6fea55f4 (diff) | |
Core/Misc: Add missing includes
Diffstat (limited to 'src/common/Utilities/Util.h')
| -rw-r--r-- | src/common/Utilities/Util.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index e3c63e0e968..9f65fd9b163 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -458,9 +458,16 @@ inline std::vector<uint8> HexStrToByteVector(std::string_view str, bool reverse TC_COMMON_API float DegToRad(float degrees); TC_COMMON_API bool StringEqualI(std::string_view str1, std::string_view str2); -inline bool StringStartsWith(std::string_view haystack, std::string_view needle) { return (haystack.substr(0, needle.length()) == needle); } +inline bool StringStartsWith(std::string_view haystack, std::string_view needle) { return haystack.starts_with(needle); } inline bool StringStartsWithI(std::string_view haystack, std::string_view needle) { return StringEqualI(haystack.substr(0, needle.length()), needle); } + TC_COMMON_API bool StringContainsStringI(std::string_view haystack, std::string_view needle); + +struct StringContainsStringI_T +{ + bool operator()(std::string_view haystack, std::string_view needle) const { return StringContainsStringI(haystack, needle); } +}; + TC_COMMON_API bool StringCompareLessI(std::string_view a, std::string_view b); struct StringCompareLessI_T |
