#include<vector>
#include<iostream>
#include<string>
#include<set>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
using std::vector;
using std::string;
using std::set;
using boost::split;
int main()
{
>-string tospilt = "hi;th^Cis;is;ni.ck;s^Cpe.aking";
>-vector<string> container;
>-string delim;
>-string a=";";
>-string b=".";
>-string c="\3";
>-delim +=a;
>-delim +=b;
>-delim +=c;
>-set<char> delimits;
>-delimits.insert(';');
>-delimits.insert('\3');
>-boost::split(container,tospilt,boost::is_any_of(delimits));
>-for(vector<string>::iterator iter = container.begin();iter != container.end();iter++)
>->-std::cout<<*iter<<std::endl;
>-return 0;
}
split配合is_any_of函数。is_any_of()的参数,是元数据的container
例如string,set<char> set<int>等