diff options
author | Michael Vogt <mvo@debian.org> | 2013-11-29 14:39:27 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-11-29 14:39:27 +0100 |
commit | e2264d3f957694e229a9f6976fc136b8f82ad770 (patch) | |
tree | c1f0b9c64d1d60defe5ce1a89c6bc136d758a772 /apt-pkg/contrib/strutl.cc | |
parent | fd4e73c33c20873af670ee40b549c46ee0d50801 (diff) | |
parent | c9a5f74bd57fa4fcf4e30cade8e48c5635448689 (diff) |
Merge branch 'debian/sid' into ubuntu/master
Conflicts:
debian/changelog
Diffstat (limited to 'apt-pkg/contrib/strutl.cc')
-rw-r--r-- | apt-pkg/contrib/strutl.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 9f794927d..962112854 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -49,6 +49,14 @@ std::string Strip(const std::string &s) size_t end = s.find_last_not_of(" \t\n"); return s.substr(start, end-start+1); } + +bool Endswith(const std::string &s, const std::string &end) +{ + if (end.size() > s.size()) + return false; + return (s.substr(s.size() - end.size(), s.size()) == end); +} + } } /*}}}*/ |