test/shared/trim_string.hpp
static std::string Trim(std::string str) {

    static std::regex const re{R"(\s*(.*)\s*)"};
    std::smatch m;
    if (std::regex_match(str, m, re)) {
        str = m[1].str();
    }
    return str;
}
/**
 * @brief   Strips all whitespace from start and end of a string.
 * @param   str     the string to strip
 * @return  same as str but all whitespaces removed.
 */
@brief   Strips all whitespace from start and end of a string.
@param   str     the string to strip
@return  same as str but all whitespaces removed.
@brief Strips all whitespace from start and end of a string . @param str the string to strip @return same as str but all whitespaces removed .
static std::string Trim(std::string str) {
    static std::regex const re{R"(\s*(.*)\s*)"};
    std::smatch m;
    if (std::regex_match(str, m, re)) {
        str = m[1].str();
    }
    return str;
}
static std :: string Trim ( std :: string str ) { static std :: regex const re { R" ( \s*(.*)\s* ) " } ; std :: smatch m ; if ( std :: regex_match ( str , m , re ) ) { str = m [ 1 ] . str ( ) ; } return str ; }
@brief   Strips all whitespace from start and end of a string.
@brief Strips all whitespace from start and end of a string .