X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/3c09d634b6aef7bbdbc75f38e3969f4b46b0ac0d..5f6c6c6e085bcba021a29d88859e70b1e03ff153:/apt-pkg/contrib/strutl.cc diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 0f48860b1..7948673dc 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -62,6 +62,13 @@ bool Endswith(const std::string &s, const std::string &end) return (s.substr(s.size() - end.size(), s.size()) == end); } +bool Startswith(const std::string &s, const std::string &start) +{ + if (start.size() > s.size()) + return false; + return (s.substr(0, start.size()) == start); +} + } } /*}}}*/