aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index c28f4e1bb..e541887ee 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -1046,6 +1046,12 @@ bool string2Int(const string & s, long long & n)
}
+bool hasSuffix(const string & s, const string & suffix)
+{
+ return s.size() >= suffix.size() && string(s, s.size() - suffix.size()) == suffix;
+}
+
+
void ignoreException()
{
try {