c/c++常用代码--string trim

typedef std::basic_string<TCHAR> tstring;

inline static void trim(tstring& s)
{
    s.erase(0, s.find_first_not_of(_T(" ")));
    s.erase(s.find_last_not_of(_T(" "))+1);
}

原文地址:https://www.cnblogs.com/vc60er/p/3998087.html