boost库

boost库

boost::split() 按照给定的谓词切割字符串,并且把切割后的值放入到给定的容器中

string str1("hello world!");

string str2;

std::vector<std::string> result;

split(result, str1, SplitNotThisChar('l')); // result = [4]("he","","o wor","d!")

remove_if()将所有应该移除的元素都移动到了容器尾部并返回一个分界的迭代器. 移除的所有元素仍然可以通过返回的迭代器访问到.

原文地址:https://www.cnblogs.com/xiaoxiaocaicai/p/3595346.html