zypp::str Namespace Reference

String related utilities and Regular expressions. More...


Classes

class  regex
class  smatch
struct  SafeBuf
 Assert free called for allocated char *. More...

Trimming whitepace.

Todo:
optimize l/r trim.


enum  Trim { NO_TRIM = 0x00, L_TRIM = 0x01, R_TRIM = 0x02, TRIM = (L_TRIM|R_TRIM) }
 To define how to trim. More...
std::string trim (const std::string &s, const Trim trim_r)
std::string ltrim (const std::string &s)
std::string rtrim (const std::string &s)

Typedefs

typedef Exception regex_error

Functions

bool regex_match (const std::string &s, smatch &matches, const regex &regex)
bool regex_match (const std::string &s, const regex &regex)
std::string form (const char *format,...) __attribute__((format(printf
 Printf style construction of std::string.
std::string strerror (int errno_r)
 Return string describing the error_r code.
std::string stripFirstWord (std::string &line, const bool ltrim_first)
string gsub (const string &sData, const string &sFrom, const string &sTo)
static std::string _getline (std::istream &str, const Trim trim_r)
std::string getline (std::istream &str, const Trim trim_r)
std::string getline (std::istream &str, bool trim)
template<class _T>
std::string asString (const _T &t)
 Global asString() that works with std::string too.
template<class _T>
std::string asString (const intrusive_ptr< _T > &p)
template<class _T>
std::string asString (const weak_ptr< _T > &p)
template<>
std::string asString (const std::string &t)
bool startsWith (const std::string &s, const char *str)
bool endsWith (const std::string &s, const char *str)
bool contains (const std::string &s, const char *str)
std::string gsub (const std::string &sData, const std::string &sFrom, const std::string &sTo)
bool strToTrue (const std::string &str)
 Parsing boolean from string.
bool strToFalse (const std::string &str)
 Return false if str is 0, false, no, off.
bool strToBool (const std::string &str, bool default_r)
 Parse str into a bool depending on the default value.
Case conversion.
std::string toLower (const std::string &s)
 Return lowercase version of s.
std::string toUpper (const std::string &s)
 Return uppercase version of s.
String representation of number.
Optional second argument sets the minimal string width (' ' padded).

Negative values will cause the number to be left adjusted within the string.

Default width is 0.

 numstring(42)           -> "42"
 numstring(42, 4)        -> "  42"
 numstring(42,-4)        -> "42  "


std::string numstring (char n, int w=0)
std::string numstring (unsigned char n, int w=0)
std::string numstring (short n, int w=0)
std::string numstring (unsigned short n, int w=0)
std::string numstring (int n, int w=0)
std::string numstring (unsigned n, int w=0)
std::string numstring (long n, int w=0)
std::string numstring (unsigned long n, int w=0)
std::string numstring (long long n, int w=0)
std::string numstring (unsigned long long n, int w=0)
String representation of number as hex value with leading '0x'.
Optional second argument sets the minimal string width (0 padded).

Negative values will cause the number to be left adjusted within the string. Default width is 10 (4 for char).

 hexstring(42)           -> "0x0000002a"
 hexstring(42, 4)        -> "0x2a"
 hexstring(42,-4)        -> "0x2a"
 


std::string hexstring (char n, int w=4)
std::string hexstring (unsigned char n, int w=4)
std::string hexstring (short n, int w=10)
std::string hexstring (unsigned short n, int w=10)
std::string hexstring (int n, int w=10)
std::string hexstring (unsigned n, int w=10)
std::string hexstring (long n, int w=10)
std::string hexstring (unsigned long n, int w=10)
std::string hexstring (long long n, int w=0)
std::string hexstring (unsigned long long n, int w=0)
String representation of number as octal value with leading '0'.
Optional second argument sets the minimal string width (0 padded).

Negative values will cause the number to be left adjusted within the string. Default width is 5 (4 for char).

 octstring(42)           -> "00052"
 octstring(42, 4)        -> "0052"
 octstring(42,-4)        -> "052 "
 


std::string octstring (char n, int w=4)
std::string octstring (unsigned char n, int w=4)
std::string octstring (short n, int w=5)
std::string octstring (unsigned short n, int w=5)
std::string octstring (int n, int w=5)
std::string octstring (unsigned n, int w=5)
std::string octstring (long n, int w=5)
std::string octstring (unsigned long n, int w=5)
std::string octstring (long long n, int w=0)
std::string octstring (unsigned long long n, int w=0)
template<typename _It>
_It strtonum (const std::string &str)
 Parsing numbers from string.
template<typename _It>
_It strtonum (const std::string &str, _It &i)
 String to integer type detemined 2nd function arg i.
Split.
template<class _OutputIterator>
unsigned split (const std::string &line_r, _OutputIterator result_r, const std::string &sepchars_r=" \t")
 Split line_r into words.
Join.
template<class _Iterator>
std::string join (_Iterator begin, _Iterator end, const std::string &sep_r=" ")
 Join strings using separator sep_r (defaults to BLANK).
template<class _Container>
std::string join (const _Container &cont_r, const std::string &sep_r=" ")
 Join strings using separator sep_r (defaults to BLANK).
String prefix handling.
bool hasPrefix (const std::string &str_r, const std::string &prefix_r)
 Return whether str_r has prefix prefix_r.
std::string stripPrefix (const std::string &str_r, const std::string &prefix_r)
 Strip a prefix_r from str_r and return the resulting string.


Detailed Description

String related utilities and Regular expressions.

See also:
Regular expressions

Typedef Documentation

typedef Exception zypp::str::regex_error

Definition at line 32 of file Regex.h.


Enumeration Type Documentation

enum zypp::str::Trim

To define how to trim.

Enumerator:
NO_TRIM 
L_TRIM 
R_TRIM 
TRIM 

Definition at line 317 of file String.h.


Function Documentation

bool zypp::str::regex_match ( const std::string &  s,
smatch matches,
const regex regex 
)

Definition at line 56 of file Regex.cc.

References zypp::str::regex::m_preg, zypp::str::regex::m_valid, zypp::str::smatch::match_str, and zypp::str::smatch::pmatch.

Referenced by zypp::applydeltarpm::applydeltarpm(), zypp::parser::susetags::PackagesDuFileReader::Impl::consumeDir(), zypp::Edition::Impl::Impl(), zypp::url::UrlBase::isValidHost(), zypp::url::UrlBase::isValidPort(), zypp::KeyRing::Impl::publicKeyIds(), zypp::PublicKey::Impl::readFromFile(), zypp::KeyRing::Impl::readSignatureKeyId(), and zypp::MediaSetAccess::rewriteUrl().

bool zypp::str::regex_match ( const std::string &  s,
const regex regex 
)

Definition at line 64 of file Regex.cc.

References zypp::str::regex::m_preg.

Referenced by zypp::capability::buildFilesystem(), zypp::capability::buildHal(), zypp::capability::buildModalias(), zypp::capability::buildNamed(), zypp::url::checkUrlData(), zypp::capability::isInterestingFileSpec(), zypp::url::UrlBase::isValidHost(), zypp::url::UrlBase::isValidScheme(), zypp::locks::Match::operator()(), zypp::capability::parse(), and zypp::Url::parseUrl().

std::string zypp::str::form ( const char *  format,
  ... 
)

Printf style construction of std::string.

Definition at line 33 of file String.cc.

References zypp::str::SafeBuf::_buf, and zypp::str::SafeBuf::asString().

Referenced by zypp::RepoManager::addRepository(), zypp::Edition::asString(), zypp::exception_detail::CodeLocation::asString(), zypp::RepoManager::buildCache(), zypp::url::checkUrlData(), zypp::filesystem::clean_dir(), zypp::cleanCacheInternal(), zypp::RepoManager::createFromCache(), zypp::repo::cached::RepoImpl::createPatchAndDeltas(), zypp::repo::cached::RepoImpl::createResolvables(), zypp::target::CommitPackageCacheReadAhead::doCacheLastInteractive(), zypp::target::rpm::RpmDb::doInstallPackage(), zypp::target::rpm::RpmDb::doRebuildDatabase(), zypp::solver::detail::ResolverInfoObsoletes::dumpOn(), zypp::solver::detail::ResolverInfoNeededBy::dumpOn(), zypp::solver::detail::ResolverInfoDependsOn::dumpOn(), zypp::solver::detail::ResolverInfoConflictsWith::dumpOn(), zypp::solver::detail::ResolverInfoChildOf::dumpOn(), zypp::parser::TagParser::errPrefix(), zypp::parser::susetags::ContentFileReader::errPrefix(), zypp::repo::PackageProvider::failOnChecksumError(), zypp::base::Unit::form(), zypp::base::ProfilingFormater::format(), zypp::base::LogControl::LineFormater::format(), hexstring(), zypp::solver::detail::logAdditionalInfo(), zypp::solver::detail::ResolverInfoObsoletes::message(), zypp::solver::detail::ResolverInfoNeededBy::message(), zypp::solver::detail::ResolverInfoMissingReq::message(), zypp::solver::detail::ResolverInfoMisc::message(), zypp::solver::detail::ResolverInfoDependsOn::message(), zypp::solver::detail::ResolverInfoConflictsWith::message(), zypp::solver::detail::ResolverInfoChildOf::message(), numstring(), octstring(), zypp::solver::detail::operator<<(), zypp::operator<<(), zypp::solver::detail::ProblemSolutionIgnoreArchitecture::ProblemSolutionIgnoreArchitecture(), zypp::solver::detail::ProblemSolutionIgnoreConflicts::ProblemSolutionIgnoreConflicts(), zypp::solver::detail::ProblemSolutionIgnoreInstalled::ProblemSolutionIgnoreInstalled(), zypp::solver::detail::ProblemSolutionIgnoreObsoletes::ProblemSolutionIgnoreObsoletes(), zypp::solver::detail::ProblemSolutionIgnoreVendor::ProblemSolutionIgnoreVendor(), zypp::solver::detail::ProblemSolutionInstall::ProblemSolutionInstall(), zypp::solver::detail::ProblemSolutionKeep::ProblemSolutionKeep(), zypp::solver::detail::ProblemSolutionUninstall::ProblemSolutionUninstall(), zypp::solver::detail::ProblemSolutionUnlock::ProblemSolutionUnlock(), zypp::solver::detail::QueueItemRequire::process(), zypp::repo::RepoMediaAccess::provideFile(), zypp::RepoManager::removeRepository(), zypp::ProgressData::report(), zypp::url::UrlBase::setHost(), zypp::url::UrlBase::setPort(), zypp::url::UrlBase::setScheme(), zypp::xml::ParseDef::Impl::skipNode(), and strerror().

std::string std::string zypp::str::strerror ( int  errno_r  ) 

Return string describing the error_r code.

Like strerror, but the numerical value is included in the string as well.

Definition at line 50 of file String.cc.

References form().

Referenced by zypp::media::MediaCD::closeTray(), zypp::media::Mount::getEntries(), zypp::media::MediaCD::openTray(), zypp::ExternalProgram::running(), zypp::externalprogram::ExternalDataSource::setBlocking(), zypp::ExternalProgram::start_program(), zypp::Exception::strErrno(), zypp::filesystem::TmpDir::TmpDir(), and zypp::filesystem::TmpFile::TmpFile().

bool zypp::str::strToTrue ( const std::string &  str  ) 

Parsing boolean from string.

Return true if str is 1, true, yes, on.

Definition at line 60 of file String.cc.

References toLower().

Referenced by strToBool().

bool zypp::str::strToFalse ( const std::string &  str  ) 

Return false if str is 0, false, no, off.

Definition at line 75 of file String.cc.

References toLower().

Referenced by strToBool().

std::string zypp::str::toLower ( const std::string &  s  ) 

Return lowercase version of s.

Todo:
improve

Definition at line 90 of file String.cc.

Referenced by zypp::solver::detail::HelixControl::addDependencies(), zypp::addTrustedVendor(), zypp::media::MediaCurl::attachTo(), zypp::CheckSum::CheckSum(), zypp::url::UrlBase::cleanupPathName(), zypp::solver::detail::HelixControl::deleteResolvable(), zypp::hasLcPrefix(), zypp::solver::detail::helixXML(), zypp::solver::detail::HelixControl::installResolvable(), zypp::url::UrlBase::isKnownScheme(), zypp::url::UrlBase::isValidScheme(), zypp::solver::detail::HelixControl::lockResolvable(), zypp::KindOf< _Tp >::operator==(), zypp::parse(), zypp::url::UrlBase::setHost(), zypp::url::UrlBase::setPathName(), zypp::url::UrlBase::setScheme(), strToFalse(), strToTrue(), and zypp::trusted().

std::string zypp::str::toUpper ( const std::string &  s  ) 

Return uppercase version of s.

Todo:
improve

Definition at line 109 of file String.cc.

Referenced by zypp::target::rpm::RpmDb::exportTrustedKeysInZyppKeyRing(), zypp::target::rpm::RpmDb::importPubkey(), and zypp::url::UrlBase::setHost().

std::string zypp::str::trim ( const std::string &  s,
const Trim  trim_r 
)

Definition at line 128 of file String.cc.

References L_TRIM, NO_TRIM, and R_TRIM.

Referenced by _getline(), zypp::addTrustedVendor(), ltrim(), zypp::locks::AddLockToPool::operator()(), zypp::parser::IniParser::parse(), zypp::base::sysconfig::read(), and rtrim().

std::string zypp::str::stripFirstWord ( std::string &  line,
const bool  ltrim_first 
)

Definition at line 162 of file String.cc.

References ltrim().

Referenced by zypp::parser::susetags::ContentFileReader::parse(), and zypp::scanProductsFile().

string zypp::str::gsub ( const string &  sData,
const string &  sFrom,
const string &  sTo 
)

Definition at line 190 of file String.cc.

static std::string zypp::str::_getline ( std::istream &  str,
const Trim  trim_r 
) [inline, static]

Definition at line 221 of file String.cc.

References trim().

Referenced by getline().

std::string zypp::str::getline ( std::istream &  str,
const Trim  trim_r 
)

Definition at line 236 of file String.cc.

References _getline().

std::string zypp::str::getline ( std::istream &  str,
bool  trim 
)

Definition at line 241 of file String.cc.

References _getline(), NO_TRIM, and TRIM.

Referenced by zypp::RepoManager::buildCache(), zypp::DiskUsageCounter::detectMountPoints(), zypp::storage::XMLFilesBackend::flagsFromFile(), zypp::media::MediaHandler::getDirectoryYast(), zypp::repo::SUSEMediaVerifier::isDesiredMedia(), zypp::iostr::EachLine::next(), zypp::base::sysconfig::read(), zypp::externalprogram::ExternalDataSource::receiveLine(), zypp::scanProductsFile(), zypp::repo::RepoMediaAccess::Impl::setVerifierForRepo(), and zypp::repo::SUSEMediaVerifier::SUSEMediaVerifier().

template<class _T>
std::string zypp::str::asString ( const _T &  t  )  [inline]

Global asString() that works with std::string too.

Definition at line 35 of file String.h.

Referenced by join().

template<class _T>
std::string zypp::str::asString ( const intrusive_ptr< _T > &  p  )  [inline]

Definition at line 39 of file String.h.

template<class _T>
std::string zypp::str::asString ( const weak_ptr< _T > &  p  )  [inline]

Definition at line 43 of file String.h.

template<>
std::string zypp::str::asString ( const std::string &  t  )  [inline]

Definition at line 47 of file String.h.

std::string zypp::str::numstring ( char  n,
int  w = 0 
) [inline]

Definition at line 114 of file String.h.

References form().

Referenced by zypp::media::MediaCD::detectDevices(), zypp::parser::plaindir::dirStatus(), zypp::debug::dumpMemOn(), and zypp::syscontent::Writer::Impl::writeXml().

std::string zypp::str::numstring ( unsigned char  n,
int  w = 0 
) [inline]

Definition at line 115 of file String.h.

References form().

std::string zypp::str::numstring ( short  n,
int  w = 0 
) [inline]

Definition at line 116 of file String.h.

References form().

std::string zypp::str::numstring ( unsigned short  n,
int  w = 0 
) [inline]

Definition at line 117 of file String.h.

References form().

std::string zypp::str::numstring ( int  n,
int  w = 0 
) [inline]

Definition at line 118 of file String.h.

References form().

std::string zypp::str::numstring ( unsigned  n,
int  w = 0 
) [inline]

Definition at line 119 of file String.h.

References form().

std::string zypp::str::numstring ( long  n,
int  w = 0 
) [inline]

Definition at line 120 of file String.h.

References form().

std::string zypp::str::numstring ( unsigned long  n,
int  w = 0 
) [inline]

Definition at line 121 of file String.h.

References form().

std::string zypp::str::numstring ( long long  n,
int  w = 0 
) [inline]

Definition at line 122 of file String.h.

References form().

std::string zypp::str::numstring ( unsigned long long  n,
int  w = 0 
) [inline]

Definition at line 123 of file String.h.

References form().

Referenced by zypp::media::MediaSource::asString(), zypp::solver::detail::Testcase::createTestcase(), zypp::media::MediaCurl::doGetDoesFileExist(), zypp::media::MediaCurl::doGetFileCopy(), zypp::media::MediaManager_Impl::findMM(), zypp::generate_non_existing_name(), zypp::solver::detail::HelixControl::HelixControl(), zypp::solver::detail::helixXML(), zypp::target::rpm::RpmDb::importPubkey(), zypp::solver::detail::HelixControl::installResolvable(), zypp::repo::SUSEMediaVerifier::isDesiredMedia(), zypp::solver::detail::HelixControl::lockResolvable(), and zypp::MediaSetAccess::rewriteUrl().

std::string zypp::str::hexstring ( char  n,
int  w = 4 
) [inline]

Definition at line 138 of file String.h.

References form().

Referenced by zypp::media::MediaHandler::createAttachPoint().

std::string zypp::str::hexstring ( unsigned char  n,
int  w = 4 
) [inline]

Definition at line 139 of file String.h.

References form().

std::string zypp::str::hexstring ( short  n,
int  w = 10 
) [inline]

Definition at line 140 of file String.h.

References form().

std::string zypp::str::hexstring ( unsigned short  n,
int  w = 10 
) [inline]

Definition at line 141 of file String.h.

References form().

std::string zypp::str::hexstring ( int  n,
int  w = 10 
) [inline]

Definition at line 142 of file String.h.

References form().

std::string zypp::str::hexstring ( unsigned  n,
int  w = 10 
) [inline]

Definition at line 143 of file String.h.

References form().

std::string zypp::str::hexstring ( long  n,
int  w = 10 
) [inline]

Definition at line 144 of file String.h.

References form().

std::string zypp::str::hexstring ( unsigned long  n,
int  w = 10 
) [inline]

Definition at line 145 of file String.h.

References form().

std::string zypp::str::hexstring ( long long  n,
int  w = 0 
) [inline]

Definition at line 146 of file String.h.

References form().

std::string zypp::str::hexstring ( unsigned long long  n,
int  w = 0 
) [inline]

Definition at line 147 of file String.h.

References form().

std::string zypp::str::octstring ( char  n,
int  w = 4 
) [inline]

Definition at line 162 of file String.h.

References form().

std::string zypp::str::octstring ( unsigned char  n,
int  w = 4 
) [inline]

Definition at line 163 of file String.h.

References form().

std::string zypp::str::octstring ( short  n,
int  w = 5 
) [inline]

Definition at line 164 of file String.h.

References form().

std::string zypp::str::octstring ( unsigned short  n,
int  w = 5 
) [inline]

Definition at line 165 of file String.h.

References form().

std::string zypp::str::octstring ( int  n,
int  w = 5 
) [inline]

Definition at line 166 of file String.h.

References form().

std::string zypp::str::octstring ( unsigned  n,
int  w = 5 
) [inline]

Definition at line 167 of file String.h.

References form().

std::string zypp::str::octstring ( long  n,
int  w = 5 
) [inline]

Definition at line 168 of file String.h.

References form().

std::string zypp::str::octstring ( unsigned long  n,
int  w = 5 
) [inline]

Definition at line 169 of file String.h.

References form().

std::string zypp::str::octstring ( long long  n,
int  w = 0 
) [inline]

Definition at line 170 of file String.h.

References form().

std::string zypp::str::octstring ( unsigned long long  n,
int  w = 0 
) [inline]

Definition at line 171 of file String.h.

References form().

Referenced by zypp::filesystem::assert_dir(), zypp::filesystem::chmod(), and zypp::filesystem::mkdir().

template<typename _It>
unsigned long long zypp::str::strtonum ( const std::string &  str  )  [inline]

Parsing numbers from string.

String to integer type determined by template arg.

Note:
Only specializations are defined.
 time_t t = strtonum<time_t>( "42" );

Definition at line 188 of file String.h.

Referenced by zypp::parser::yum::PrimaryFileReader::Impl::consumeNode(), zypp::parser::yum::OtherFileReader::Impl::consumeNode(), and zypp::parser::yum::FilelistsFileReader::Impl::consumeNode().

template<typename _It>
_It zypp::str::strtonum ( const std::string &  str,
_It &  i 
) [inline]

String to integer type detemined 2nd function arg i.

 time_t t; strtonum( "42", t );

Definition at line 211 of file String.h.

Referenced by zypp::Date::Date(), and zypp::ZConfig::Impl::Impl().

bool zypp::str::strToBool ( const std::string &  str,
bool  default_r 
) [inline]

Parse str into a bool depending on the default value.

If the default is true, look for a legal false string. If the default is false, look for a legal true string.

Definition at line 229 of file String.h.

References strToFalse(), and strToTrue().

Referenced by zypp::ZConfig::Impl::Impl().

template<class _OutputIterator>
unsigned zypp::str::split ( const std::string &  line_r,
_OutputIterator  result_r,
const std::string &  sepchars_r = " \t" 
) [inline]

Split line_r into words.

Any sequence of characters in sepchars_r is treated as delimiter. The words are passed to OutputIterator result_r.

 std::vector<std::string> words;
 str::split( "some line", std::back_inserter(words) )

Definition at line 246 of file String.h.

Referenced by zypp::media::CurlAuthData::auth_type_str2long(), zypp::parser::susetags::PackagesFileReader::Impl::consumeCks(), zypp::parser::susetags::PackagesFileReader::Impl::consumeLoc(), zypp::parser::susetags::PatternFileReader::Impl::consumePat(), zypp::parser::susetags::PackagesLangFileReader::Impl::consumePkg(), zypp::parser::susetags::PackagesFileReader::Impl::consumePkg(), zypp::parser::susetags::PackagesDuFileReader::Impl::consumePkg(), zypp::parser::susetags::PackagesFileReader::Impl::consumeShr(), zypp::parser::susetags::PackagesFileReader::Impl::consumeSiz(), zypp::parser::susetags::PackagesFileReader::Impl::consumeSrc(), log_curl(), zypp::media::ProxyInfoSysconfig::ProxyInfoSysconfig(), zypp::parser::susetags::ContentFileReader::Impl::setFileCheckSum(), zypp::parser::susetags::ContentFileReader::Impl::setUrlList(), and zypp::cache::string_to_checksum().

template<class _Iterator>
std::string zypp::str::join ( _Iterator  begin,
_Iterator  end,
const std::string &  sep_r = " " 
) [inline]

Join strings using separator sep_r (defaults to BLANK).

Definition at line 276 of file String.h.

References asString().

Referenced by join().

template<class _Container>
std::string zypp::str::join ( const _Container &  cont_r,
const std::string &  sep_r = " " 
) [inline]

Join strings using separator sep_r (defaults to BLANK).

Definition at line 291 of file String.h.

References join().

std::string zypp::str::ltrim ( const std::string &  s  )  [inline]

Definition at line 326 of file String.h.

References L_TRIM, and trim().

Referenced by zypp::parser::IniParser::parse(), and stripFirstWord().

std::string zypp::str::rtrim ( const std::string &  s  )  [inline]

Definition at line 329 of file String.h.

References R_TRIM, and trim().

Referenced by zypp::parser::IniParser::parse(), and zypp::media::MediaDISK::verifyIfDiskVolume().

bool zypp::str::startsWith ( const std::string &  s,
const char *  str 
) [inline]

Definition at line 339 of file String.h.

bool zypp::str::endsWith ( const std::string &  s,
const char *  str 
) [inline]

Definition at line 340 of file String.h.

Referenced by zypp::repo::susetags::Downloader::download().

bool zypp::str::contains ( const std::string &  s,
const char *  str 
) [inline]

Definition at line 341 of file String.h.

std::string zypp::str::gsub ( const std::string &  sData,
const std::string &  sFrom,
const std::string &  sTo 
)

Looks for text in a string and replaces it.

Note:
It only perform substtution in one pass

Referenced by zypp::repo::RepoVariablesStringReplacer::operator()(), and zypp::locks::wildcards2regex().

bool zypp::str::hasPrefix ( const std::string &  str_r,
const std::string &  prefix_r 
) [inline]

Return whether str_r has prefix prefix_r.

Definition at line 357 of file String.h.

Referenced by zypp::parser::susetags::PackagesDuFileReader::Impl::consumeDir(), zypp::repo::susetags::Downloader::download(), zypp::parser::TagParser::parse(), and stripPrefix().

std::string zypp::str::stripPrefix ( const std::string &  str_r,
const std::string &  prefix_r 
) [inline]

Strip a prefix_r from str_r and return the resulting string.

Definition at line 361 of file String.h.

References hasPrefix().

Referenced by zypp::repo::susetags::Downloader::download().


Generated on Tue Sep 25 19:23:28 2007 for libzypp by  doxygen 1.5.3