summaryrefslogtreecommitdiff
path: root/util/goodies.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/goodies.h')
-rw-r--r--util/goodies.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/goodies.h b/util/goodies.h
index 631ed12b9f6..7c38f8d1e93 100644
--- a/util/goodies.h
+++ b/util/goodies.h
@@ -191,3 +191,11 @@ public:
*/
//typedef boostlock lock;
+
+inline bool endsWith(const char *p, const char *suffix) {
+ int a = strlen(p);
+ int b = strlen(suffix);
+ if( b > a ) return false;
+ return strcmp(p + a - b, suffix) == 0;
+}
+