59 std::transform(str.begin(), str.end(), str.begin(), ::tolower);
67 std::find_if(s.begin(), s.end(), [](
unsigned char ch) { return !std::isspace(ch); }));
73 s.erase(std::find_if(s.rbegin(), s.rend(), [](
unsigned char ch) { return !std::isspace(ch); })
80 void trim(std::string& s) {
89 std::erase(res,
'\n');
90 std::erase(res,
'\r');
bool isNumericalWithResult(const std::string &val, double *res)
return true is a string contains a numerical (double) value
void ltrim(std::string &s)
trim from start (in place)
bool isNumerical(const std::string &val)
return true is a string contains a numerical (double) value
bool isIntegerWithResult(const std::string &val, int *res)
return true is a string contains an integer value
bool isInteger(const std::string &val)
return true is a string contains an integer value
std::string toLower(std::string str)
Returns the lowercase version of str.
void trim(std::string &s)
trim from both ends (in place)
std::string remove_newline(const std::string &s)
remove all newlines in a string
void rtrim(std::string &s)
trim from end (in place)
std::string trim_copy(const std::string &s)
trim from both ends (copying)
gum is the global namespace for all aGrUM entities
Utilities for manipulating strings.