Classes | |
struct | SafeBuf |
Assert free called for allocated char * . More... | |
Trimming whitepace. | |
| |
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) |
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. | |
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) |
String to integer type determined by template arg. | |
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 (defaults to BLANK). | |
template<class _Container> | |
std::string | join (const _Container &cont_r, const std::string &sep_r=" ") |
Join strings using separator (defaults to BLANK). | |
Functions | |
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) |
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) |
|
To define how to trim.
|
|
|
Return string describing the error_r code. Like strerror, but the numerical value is included in the string as well. Definition at line 48 of file String.cc. References form(). Referenced by zypp::ExternalProgram::running(), zypp::externalprogram::ExternalDataSource::setBlocking(), and zypp::Exception::strErrno(). |
|
Return lowercase version of s.
Definition at line 58 of file String.cc. Referenced by zypp::source::yum::YUMSourceImpl::checkCheckSum(), zypp::CheckSum::CheckSum(), zypp::url::UrlBase::cleanupPathName(), zypp::url::UrlBase::isKnownScheme(), zypp::url::UrlBase::isValidScheme(), zypp::KindOf< _Tp >::operator==(), zypp::url::UrlBase::setScheme(), and zypp::trusted(). |
|
Return uppercase version of s.
Definition at line 77 of file String.cc. Referenced by zypp::target::rpm::RpmDb::exportTrustedKeysInZyppKeyRing(). |
|
Definition at line 96 of file String.cc. References L_TRIM, NO_TRIM, and R_TRIM. Referenced by _getline(), ltrim(), and rtrim(). |
|
Definition at line 130 of file String.cc. References ltrim(). |
|
Definition at line 166 of file String.cc. References trim(). Referenced by getline(). |
|
Definition at line 181 of file String.cc. References _getline(). Referenced by zypp::SourceFactory::scanProductsFile(). |
|
Definition at line 186 of file String.cc. References _getline(), NO_TRIM, and TRIM. |
|
Definition at line 107 of file String.h. References form(). Referenced by zypp::media::MediaSource::asString(), zypp::debug::dumpMemOn(), zypp::media::MediaManager_Impl::findMM(), zypp::source::SourceImpl::Verifier::isDesiredMedia(), and zypp::source::MediaSet::rewriteUrl(). |
|
Definition at line 108 of file String.h. References form(). |
|
Definition at line 109 of file String.h. References form(). |
|
Definition at line 110 of file String.h. References form(). |
|
Definition at line 111 of file String.h. References form(). |
|
Definition at line 112 of file String.h. References form(). |
|
Definition at line 113 of file String.h. References form(). |
|
Definition at line 114 of file String.h. References form(). |
|
Definition at line 115 of file String.h. References form(). |
|
Definition at line 116 of file String.h. References form(). |
|
Definition at line 131 of file String.h. References form(). Referenced by zypp::SourceCache::removeSource(), and zypp::SourceCache::storeSource(). |
|
Definition at line 132 of file String.h. References form(). |
|
Definition at line 133 of file String.h. References form(). |
|
Definition at line 134 of file String.h. References form(). |
|
Definition at line 135 of file String.h. References form(). |
|
Definition at line 136 of file String.h. References form(). |
|
Definition at line 137 of file String.h. References form(). |
|
Definition at line 138 of file String.h. References form(). |
|
Definition at line 139 of file String.h. References form(). |
|
Definition at line 140 of file String.h. References form(). |
|
Definition at line 155 of file String.h. References form(). Referenced by zypp::filesystem::chmod(), and zypp::filesystem::mkdir(). |
|
Definition at line 156 of file String.h. References form(). |
|
Definition at line 157 of file String.h. References form(). |
|
Definition at line 158 of file String.h. References form(). |
|
Definition at line 159 of file String.h. References form(). |
|
Definition at line 160 of file String.h. References form(). |
|
Definition at line 161 of file String.h. References form(). |
|
Definition at line 162 of file String.h. References form(). |
|
Definition at line 163 of file String.h. References form(). |
|
Definition at line 164 of file String.h. References form(). |
|
String to integer type determined by template arg.
Definition at line 181 of file String.h. Referenced by zypp::source::susetags::MediaMetadataParser::parse(). |
|
String to integer type detemined 2nd function arg i.
time_t t; strtonum( "42", t ); |
|
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 221 of file String.h. Referenced by zypp::source::susetags::SelectionTagFileParser::consume(), zypp::source::susetags::PatternTagFileParser::consume(), zypp::source::susetags::PackagesParser::consume(), zypp::source::susetags::PackageDiskUsageParser::consume(), zypp::source::susetags::PackagesLangParser::consume(), zypp::DiskUsageCounter::detectMountPoints(), zypp::source::susetags::ProductMetadataParser::parse(), zypp::source::susetags::ProductMetadataParser::parseFileCheckSum(), zypp::media::ProxyInfoSysconfig::ProxyInfoSysconfig(), and zypp::kvmap::KVMapBase::split(). |
|
Join strings using separator (defaults to BLANK).
Definition at line 251 of file String.h. Referenced by zypp::KVMap< KVMapOpts >::asString(), zypp::Arch::asString(), join(), zypp::parser::yum::operator<<(), and zypp::TranslatedText::Impl::setText(). |
|
Join strings using separator (defaults to BLANK).
Definition at line 266 of file String.h. References join(). |
|
Definition at line 301 of file String.h. References L_TRIM, and trim(). Referenced by stripFirstWord(). |
|
|