Man*_*noj 4 c++ string boost split
我有一串格式[id1,id2,id3].我正在使用boost split来分割字符串并将其填充到矢量中.
[id1,id2,id3]
boost::split(ids, message, boost::is_any_of("[, ]"));
id是我的向量声明为std::vector<std::string> ids.
std::vector<std::string> ids
现在只有向量的奇数索引包含id,偶数为空.谁能告诉我可能是什么原因以及如何解决它.
Shu*_*huo 7
boost::algorithm::split( ids, message, boost::is_any_of("[, ]"), boost::algorithm::token_compress_on );
归档时间:
14 年,8 月 前
查看次数:
3246 次
最近记录: