summaryrefslogtreecommitdiff
path: root/ZAPDUtils/Utils/StringHelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ZAPDUtils/Utils/StringHelper.cpp')
-rw-r--r--ZAPDUtils/Utils/StringHelper.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/ZAPDUtils/Utils/StringHelper.cpp b/ZAPDUtils/Utils/StringHelper.cpp
index 051e9a8..26a8af3 100644
--- a/ZAPDUtils/Utils/StringHelper.cpp
+++ b/ZAPDUtils/Utils/StringHelper.cpp
@@ -64,7 +64,11 @@ void StringHelper::ReplaceOriginal(std::string& str, const std::string& from, co
bool StringHelper::StartsWith(const std::string& s, const std::string& input)
{
+#if __cplusplus >= 202002L
+ return s.starts_with(input.c_str());
+#else
return s.rfind(input, 0) == 0;
+#endif
}
bool StringHelper::Contains(const std::string& s, const std::string& input)