std::string 去除先后空格

void trimString(std::string & str ) { int s = str.find_first_not_of(" "); int e = str.find_last_not_of(" "); str = str.substr(s,e-s+1); return; }
相关文章
相关标签/搜索