From cdb9307c701fd016325c83dc879351912fb35c9d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 16 Nov 2010 10:35:10 +0100 Subject: add support for third party changelogs --- apt-pkg/contrib/strutl.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apt-pkg/contrib/strutl.cc') 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 /*{{{*/ // --------------------------------------------------------------------- -- cgit v1.2.3