你好!不管是多少个空格的字符串,使用trim后,结果是空串。你可以自己试验下,string st = “ ";st = st.trim();
一大串空格
string st = “ ";st = st.trim();