From e5b91f00b0688d5cba6870da6d6ad3300097b07f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 24 Jan 2023 14:25:49 -0500 Subject: Common: Replace StringBeginsWith/StringEndsWith with std equivalents Obsoletes these functions in favor of the standard member functions added in C++20. --- Source/Core/Common/StringUtil.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'Source/Core/Common/StringUtil.cpp') diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp index c8d862e424..1bfb54e9f9 100644 --- a/Source/Core/Common/StringUtil.cpp +++ b/Source/Core/Common/StringUtil.cpp @@ -431,16 +431,6 @@ std::string ReplaceAll(std::string result, std::string_view src, std::string_vie return result; } -bool StringBeginsWith(std::string_view str, std::string_view begin) -{ - return str.size() >= begin.size() && std::equal(begin.begin(), begin.end(), str.begin()); -} - -bool StringEndsWith(std::string_view str, std::string_view end) -{ - return str.size() >= end.size() && std::equal(end.rbegin(), end.rend(), str.rbegin()); -} - void StringPopBackIf(std::string* s, char c) { if (!s->empty() && s->back() == c) -- cgit v1.2.3