X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/65dbd5a1a32f63dae81c8b5814cd246f1154c38d..42e19c826b9da6c21a6d286f31db51bc04c73d87:/apt-pkg/contrib/strutl.cc?ds=sidebyside 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); +} + } } /*}}}*/