]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/strutl.cc
work on requests with the correct upgrade/dist-upgrade/else resolver
[apt.git] / apt-pkg / contrib / strutl.cc
index f3704581044252ee39fb06959932bda0aaf402a0..2e2bb5ebcdfdfb985c427d2f16d403730b9f67aa 100644 (file)
@@ -1191,6 +1191,15 @@ char *safe_snprintf(char *Buffer,char *End,const char *Format,...)
    return Buffer + Did;
 }
                                                                        /*}}}*/
+// StripEpoch - Remove the version "epoch" from a version string       /*{{{*/
+// ---------------------------------------------------------------------
+string StripEpoch(const string &VerStr)
+{
+   size_t i = VerStr.find(":");
+   if (i == string::npos)
+      return VerStr;
+   return VerStr.substr(i+1);
+}
 
 // tolower_ascii - tolower() function that ignores the locale          /*{{{*/
 // ---------------------------------------------------------------------