类似于guava下的Splitter
split需要头文件<boost/algorithm/string.hpp>,用于切割string字符串,将切割之后的字符串放到一个std::vector<std::string> 之中
boost::split(type, select_list, boost::is_any_of(","), boost::token_compress_on);
type:类型是std::vectorstd::string,用于存放切割之后的字符串
select_list:传入的字符串,可以为空
boost::is_any_of(“,”):设定切割符为,(逗号)
boost::token_compress_on:将连续多个分隔符当一个,默认没有打开,当用的时候一般是要打开的。
参考资料
https://www.boost.org/doc/libs/1_83_0/doc/html/boost/algorithm/split.html