summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/strutl.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2011-02-02 22:49:41 +0100
committerMichael Vogt <mvo@debian.org>2011-02-02 22:49:41 +0100
commit7c748f4aa1bd47089672353fd1a401d1c5c94723 (patch)
tree633dd1ca8e7e40cfa25d6227d9859b04bd9d1fad /apt-pkg/contrib/strutl.cc
parenta92392501b5981b41da8497a99f5964e2f6075b0 (diff)
parent7763525dea18d978a1df8eee4a517314ae49ca71 (diff)
merged from the lp:~mvo/apt/mvo branch
Diffstat (limited to 'apt-pkg/contrib/strutl.cc')
-rw-r--r--apt-pkg/contrib/strutl.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index 987f4c3a4..c2b335ed7 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -1174,6 +1174,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 /*{{{*/
// ---------------------------------------------------------------------