cpp-mate
0.7
Helpful library for C++.
|
Functions | |
std::string & | trimBegin (std::string &str, const std::string &chars="\t\n\v\f\r ") |
Trims beginning of the string out of specified characters in place. More... | |
std::string & | trimEnd (std::string &str, const std::string &chars="\t\n\v\f\r ") |
Trims ending of the string out of specified characters in place. More... | |
std::string & | trim (std::string &str, const std::string &chars="\t\n\v\f\r ") |
Trims beginning and ending of the string out of specified characters in place. More... | |
std::string & | replace (std::string &str, char oldCh, char newCh) |
Replaces all occurrences of specified character to another. More... | |
bool | compareIgnoreCase (const std::string &str1, const std::string &str2) |
compareIgnoreCase More... | |
std::vector< std::string > | split (const std::string &str, char ch, std::function< bool(std::string &)> preprocess=nullptr) |
Splits string by specifiet character. More... | |
bool CppMate::String::compareIgnoreCase | ( | const std::string & | str1, |
const std::string & | str2 | ||
) |
compareIgnoreCase
str1 | |
str2 |
std::string& CppMate::String::replace | ( | std::string & | str, |
char | oldCh, | ||
char | newCh | ||
) |
Replaces all occurrences of specified character to another.
str | the string to process. |
oldCh | existing character. |
newCh | replace character. |
std::vector<std::string> CppMate::String::split | ( | const std::string & | str, |
char | ch, | ||
std::function< bool(std::string &)> | preprocess = nullptr |
||
) |
Splits string by specifiet character.
str | the string to split. |
ch | character as delimiter. |
preprocess | optional preprocessor of each part. |
std::string& CppMate::String::trim | ( | std::string & | str, |
const std::string & | chars = "\t\n\v\f\r " |
||
) |
Trims beginning and ending of the string out of specified characters in place.
str | the string to trim. |
chars | list of characters to trim. |
std::string& CppMate::String::trimBegin | ( | std::string & | str, |
const std::string & | chars = "\t\n\v\f\r " |
||
) |
Trims beginning of the string out of specified characters in place.
str | the string to trim. |
chars | list of characters to trim. |
std::string& CppMate::String::trimEnd | ( | std::string & | str, |
const std::string & | chars = "\t\n\v\f\r " |
||
) |
Trims ending of the string out of specified characters in place.
str | the string to trim. |
chars | list of characters to trim. |