29 inline std::string makeevrstr(
const std::string & version_r,
30 const std::string & release_r,
33 std::string ret( version_r );
34 if ( ! release_r.empty() )
43 inline std::string makeevrstr(
const char * version_r,
44 const char * release_r,
46 {
return makeevrstr( std::string(version_r?version_r:
""),
47 std::string(release_r?release_r:
""),
87 for ( ; *
sep >=
'0' && *
sep <=
'9'; ++
sep )
90 return str::strtonum<epoch_t>( std::string(
str,
sep-
str ) );
99 for ( ; *
sep >=
'0' && *
sep <=
'9'; ++
sep )
104 sep = ::strrchr(
str,
'-' );
113 const char *
sep = ::strrchr(
str,
'-' );
117 return std::string();
122 if ( lhs == rhs )
return 0;
124 return( lhs ? 1 : -1 );
129 if ( lhs == rhs )
return 0;
130 if ( lhs && rhs ) return ::pool_evrcmp_str(
myPool().getPool(), lhs, rhs,
EVRCMP_MATCH );
131 return( lhs ? 1 : -1 );
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
std::string version() const
Version.
Edition()
Default ctor: noedition.
unsigned int epoch_t
Type of an epoch.
std::string release() const
Release.
static int _doMatch(const char *lhs, const char *rhs)
epoch_t epoch() const
Epoch.
static int _doCompare(const char *lhs, const char *rhs)
static const Edition noedition
Value representing noedition ("") This is in fact a valid Edition.
const char * c_str() const
String related utilities and Regular expression matching.
std::string numstring(char n, int w=0)
Easy-to use interface to the ZYPP dependency resolver.
static PoolImpl & myPool()