|
Namespaces |
| namespace | string_util |
Functions |
|
string | string_util::makeLower (const std::string &s) ATTR_must_check |
| | returns lower case version of s
|
|
string | string_util::makeUpper (const std::string &s) ATTR_must_check |
| | returns upper case version of s
|
|
string | string_util::removePrefix (const std::string &str, const std::string &pre) ATTR_must_check |
| | returns str with pre removed - if pre is not fully matched, str is returned unchanged
|
|
string | string_util::trim (const std::string &str) ATTR_must_check |
| | removes whitespace (as defined by isspace()) from the beginning and end of str, and returns the result
|
|
bool | string_util::parseArgs (const std::string &input, std::vector< std::string > &args, std::vector< unsigned int > &offsets) |
| | parses the input string into an arg list, with corresponding offsets of each arg in the original input
|
|
string | string_util::tildeExpansion (const std::string &str) ATTR_must_check |
| | replaces ~USER prefix with specified user's home directory, or ~ prefix with current HOME environment setting; returns str if no valid expansion is found
|