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/FileUtil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/Common/FileUtil.cpp') diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 983e7d21a0..dfb82712d7 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -171,7 +171,7 @@ bool Delete(const std::string& filename, IfAbsentBehavior behavior) DEBUG_LOG_FMT(COMMON, "Delete: file {}", filename); #ifdef ANDROID - if (StringBeginsWith(filename, "content://")) + if (filename.starts_with("content://")) { const bool success = DeleteAndroidContent(filename); if (!success) @@ -1054,7 +1054,7 @@ void SetUserPath(unsigned int dir_index, std::string path) #endif // Directories should end with a separator, files should not. - while (StringEndsWith(path, "/")) + while (path.ends_with('/')) path.pop_back(); if (path.empty()) return; -- cgit v1.2.3