stringstream去除字符串中间的空格

string s1("hello,  world ! 12 3 4");
    s << s1;
    while (s >> s1) {
        cout << s1 << endl;
    }

 

posted @ 2022-02-26 11:53  平平淡淡yg  阅读(117)  评论(0)    收藏  举报