Exemple #1
0
char* trim(char* str)
{
  char* trimmed = trimLeading(str);
  trimmed = trimTrailing(trimmed);

  return trimmed;
}
Exemple #2
0
    /**
      Remove whitespace from the beginning and end of a string.

      \param s  String to be trimmed.
    */
    inline void trim(std::string& s)
    {
        trimLeading(s);
        trimTrailing(s);
    }