All pastes #925383 Raw Edit

Stuff

public cpp v1 · immutable
·published 2008-03-02 23:36 UTC
rendered paste body
        inline std::string strip_whitespace(const std::string& s)        {            if (s.empty())                return "";            std::string::size_type start = s.find_first_not_of(" \t\n\r");            if (start == std::string::npos)                return "";            std::string::size_type end = s.find_last_not_of(" \t\n\r");            return std::string(s, start, end-start+1);        }