1 |
/*************************************************************************** |
/*************************************************************************** |
2 |
* * |
* * |
3 |
* Copyright (C) 2014-2015 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. * |
68 |
} |
} |
69 |
|
|
70 |
static bool endsWith(const string& haystack, const string& needle) { |
static bool endsWith(const string& haystack, const string& needle) { |
71 |
|
if (haystack.size() < needle.size()) return false; |
72 |
return haystack.substr(haystack.size() - needle.size(), needle.size()) == needle; |
return haystack.substr(haystack.size() - needle.size(), needle.size()) == needle; |
73 |
} |
} |
74 |
|
|