summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/strutl.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-11-18 10:32:41 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2010-11-18 10:32:41 +0100
commit2d555a8205eccc4cb17b93f7c92b71a854e8f82e (patch)
tree560bb435bfb46f73abe61174edfffbfce1b2de85 /apt-pkg/contrib/strutl.cc
parent0e3e112e3d60647e335aee7e6ce308b29fd11988 (diff)
parentd786352da27c6f05bc372a061f3a78237b69e6f4 (diff)
merged lp:~mvo/apt/apt-get-changelog
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 /*{{{*/
// ---------------------------------------------------------------------