]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/strutl.cc
do not change protected packages in autoinstall (Closes: #618848)
[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          /*{{{*/
 // ---------------------------------------------------------------------