35 size_t loc = checkedString.find(searchString);
36 if(std::string::npos == loc)
37 return std::string(
"");
38 return checkedString.substr(loc + searchString.size());
41 inline std::string
replace(std::string
str,
char oldChar,
char newChar)
49 str.erase(remove_if(
str.begin(),
str.end(), ::isspace),
str.end());
55 transform(
str.begin(),
str.end(),
str.begin(), ::toupper);
61 transform(
str.begin(),
str.end(),
str.begin(), ::tolower);
69 if(
str.front() ==
'"')
79 size_t pos =
str.find(toFind);
80 while( pos != std::string::npos) {
81 str.replace(pos, toFind.size(), toReplaceWith);
82 pos =
str.find(toFind, pos + toReplaceWith.size());
std::string stringToLower(std::string str)
Replaces all uppercase characters in str with lowercase and returns the resulting string.
std::string stringToUpper(std::string str)
Replaces all lowercase characters in str with uppercase and returns the resulting string.
std::string replace(std::string str, char oldChar, char newChar)
Replaces all instances of oldChar in string str with newChar and returns the resulting string.
std::string removeSpaces(std::string str)
Removes all space chars of str returns the resulting string.
void findAndReplace(std::string &str, std::string toFind, std::string toReplaceWith)
std::string removeExternalQuotes(std::string str)
Removes double quotes from start and end of string str and returns the resulting string.
std::string findStringAndGetAllAfter(std::string checkedString, std::string searchString)
Finds string searchString inside checkedString and returns all to the right inside checkedString....