string strtest;
string::size_type pos=strtest.find_first_not_of( ' ');
string strnew = strtest.substr(pos,strtest.size()-pos);
string::size_type pos=strtest.find_first_not_of( ' ');
string strnew = strtest.substr(pos,strtest.size()-pos);
转载于:https://www.cnblogs.com/zzili/archive/2012/12/06/6663329.html