Functions | |
std::string | form (const char *format,...) __attribute__((format(printf |
std::string | numstring (char n, int w=0) |
std::string | numstring (unsigned char 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) |
std::string | hexstring (char n, int w=4) |
std::string | hexstring (unsigned char n, int w=4) |
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) |
std::string | octstring (char n, int w=4) |
std::string | octstring (unsigned char n, int w=4) |
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) |
std::string | getline (std::istream &str, const bool trimed=false) |
unsigned | split (const std::string line_r, std::vector< std::string > &words_r, const std::string &sep_t="\t", const bool singlesep_r=false) |
std::string | join (const std::vector< std::string > &words_r, const std::string &sep_r="") |
std::list< std::string > | splitToLines (const std::string text_r, const std::string &sep_r="\n") |
std::string | stripFirstWord (std::string &value, const bool ltrim_first=false) |
std::string | ltrim (const std::string &s) |
std::string | rtrim (const std::string &s) |
std::string | trim (const std::string &s) |
std::string | toLower (const std::string &s) |
std::string | toUpper (const std::string &s) |
std::ostream & | dumpOn (std::ostream &str, const std::list< std::string > &l, const bool numbered=false) |
std::ostream & | dumpOn (std::ostream &str, const std::vector< std::string > &l, const bool numbered=false) |
Variables | |
const unsigned | tmpBuffLen = 1024 |
char | tmpBuff [tmpBuffLen] |
|
|
|
Helper for stream output |
|
Printf style building of strings via format string.
|
|
Return one line read from istream. Aftrwards the streampos is behind the delimiting ' If trim is true, the string returned is trimmed (surrounding whitespaces removed).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Print 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).
|
|
Join strinngs in words_r using separator sep_r |
|
Return string with leading/trailing/surrounding whitespace removed |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Print 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Print 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).
|
|
|
|
Split line into words singlesep_r = false: Separator is any nonenmpty sequence of characters listed in sep_t. Leading trailing separators are ignored. Example: singlesep_r = false, sep_t = ":"
|
|
Split string into a list of lines using any< char in sep_r as line delimiter. The delimiter is stripped from the line.
|
|
Strip the first word (delimited by blank or tab) from value, and return it. Adjust value to start with the second word afterwards. If value starts with blank or tab, the first word is empty and value will be ltrimmed afterwards. If ltrim_first is true, value will be ltrimmed before stripping the first word. Thus first word is empty, iff value is empty or contains whitespace only.
|
|
Return string converted to lower/upper case |
|
|
|
|
|
|
|
|