]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/strutl.cc
suppoer $(ARCH) in deb822 sources.list as well
[apt.git] / apt-pkg / contrib / strutl.cc
index 9f794927d0e3280f1a3f9e5072b28c0c896d533a..962112854d9a9a50d444d7acc4715dd3c259c067 100644 (file)
@@ -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);
+}
+
 }
 }
                                                                        /*}}}*/