libtld/tld_emails.cpp
void trim(std::string& value)
{
    if(!value.empty())
    {
        size_t i(value.length());
        for(; i > 0; --i)
        {
            const char c(value[i - 1]);
            if(c != ' ' && c != '\r' && c != '\n' && c != '\t')
            {
                break;
            }
        }
        value.resize(i);
    }
}
/** \brief Internal function used to trim a string.
 *
 * This function is used to remove any white spaces (\\r, \\n, \\t, and
 * spaces (\\x20)) from the end of the string passed in as a parameter.
 *
 * The function makes use of the resize() function if any character
 * need to be removed.
 *
 * \param[in,out] value  The string to be trimmed
 */
\brief Internal function used to trim a string.

The function makes use of the resize() function if any character
need to be removed.

\param[in,out] value  The string to be trimmed
\ brief Internal function used to trim a string . The function makes use of the resize () function if any character need to be removed . \ param [ in out ] value The string to be trimmed
void trim(std::string& value)
{
    if(!value.empty())
    {
        size_t i(value.length());
        for(; i > 0; --i)
        {
            const char c(value[i - 1]);
            if(c != ' ' && c != '\r' && c != '\n' && c != '\t')
            {
                break;
            }
        }
        value.resize(i);
    }
}
void trim ( std :: string & value ) { if ( ! value . empty ( ) ) { size_t i ( value . length ( ) ) ; for ( ; i > 0 ; -- i ) { const char c ( value [ i - 1 ] ) ; if ( c != ' ' && c != ' \r ' && c != ' \n ' && c != ' \t ' ) { break ; } } value . resize ( i ) ; } }
\brief Internal function used to trim a string.
\ brief Internal function used to trim a string .