aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.cpp')
-rw-r--r--src/utils.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils.cpp b/src/utils.cpp
index 71e2b5c..c9a2714 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -599,3 +599,8 @@ long hexparse(const std::string& input)
return value;
}
+bool stringEndsWith(const std::string& fullString, const std::string& ending)
+{
+ return fullString.length() >= ending.length() and
+ fullString.compare(fullString.length() - ending.length(), ending.length(), ending) == 0;
+}