1 |
/*************************************************************************** |
/*************************************************************************** |
2 |
* * |
* * |
3 |
* Copyright (C) 2014 Christian Schoenebeck * |
* Copyright (C) 2014 - 2017 Christian Schoenebeck * |
4 |
* <cuse@users.sourceforge.net> * |
* <cuse@users.sourceforge.net> * |
5 |
* * |
* * |
6 |
* This program is part of libgig. * |
* This program is part of libgig. * |
54 |
} |
} |
55 |
|
|
56 |
static bool endsWith(const string& haystack, const string& needle) { |
static bool endsWith(const string& haystack, const string& needle) { |
57 |
|
if (haystack.size() < needle.size()) return false; |
58 |
return haystack.substr(haystack.size() - needle.size(), needle.size()) == needle; |
return haystack.substr(haystack.size() - needle.size(), needle.size()) == needle; |
59 |
} |
} |
60 |
|
|