diff options
| author | Lioncash <mai.iam2048@gmail.com> | 2023-01-24 14:25:49 -0500 |
|---|---|---|
| committer | Lioncash <mai.iam2048@gmail.com> | 2023-01-24 14:58:20 -0500 |
| commit | e5b91f00b0688d5cba6870da6d6ad3300097b07f (patch) | |
| tree | 09ec8ac31ff935d63aa9c06004802156ac96ebf5 /Source/Core/Common/StringUtil.cpp | |
| parent | ba6ee9d7ba9730e5b2165ff0ee18cbc23762b129 (diff) | |
Common: Replace StringBeginsWith/StringEndsWith with std equivalents
Obsoletes these functions in favor of the standard member functions
added in C++20.
Diffstat (limited to 'Source/Core/Common/StringUtil.cpp')
| -rw-r--r-- | Source/Core/Common/StringUtil.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
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) |
