...世界上最受尊敬、设计最精良的 C++ 库项目之一。 — Herb Sutter 和 Andrei Alexandrescu, C++ Coding Standards
...世界上最受尊敬、设计最精良的 C++ 库项目之一。
boost::trim_copy — Trim。
// In header: <boost/algorithm/string/trim.hpp> template<typename SequenceT> SequenceT trim_copy(const SequenceT & Input, const std::locale & Loc = std::locale());
删除输入字符串的所有前导和尾随空格。结果是输入字符串的修剪副本。
此函数提供强异常安全保证
参数
输入
一个输入序列
位置
用于 '空格' 分类的区域设置
返回
输入字符串的修剪副本