boost提供了很簡單的方式對字串做trim的動作。
1
}
執行結果
See Also
(原創) 如何将字符串前后的空白去除? (C/C++) (使用string.find_first_not_of, string.find_last_not_of)
(原創) 如何将字符串前后的空白去除? (C/C++) (使用template,可去whitespace) (template)
Reference
C++ Cookbook Recipe 4.2
boost提供了很簡單的方式對字串做trim的動作。
執行結果
相关文章: