diff options
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r-- | src/libutil/util.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc index c28f4e1bb7b8..e541887ee0d4 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 { |