...世界上最受推崇和设计精良的 C++ 库项目之一。 — Herb Sutter 和 Andrei Alexandrescu,《C++ 编码规范
...世界上最受推崇和设计精良的 C++ 库项目之一。
boost::algorithm::trim_right_if — 右侧裁剪 - 参数化。
// In header: <boost/algorithm/string/trim.hpp> template<typename SequenceT, typename PredicateT> void trim_right_if(SequenceT & Input, PredicateT IsSpace);
移除输入字符串末尾的所有空格。提供的谓词用于确定哪些字符被认为是空格。输入序列将被就地修改。
参数
输入
一个输入序列
IsSpace
一个一元谓词,用于识别空格