string teststr = "1,2,3,4,5";
boost::char_separator<char> separator(",");
boost::tokenizer<boost::char_separator<char> > tokens(teststr, separator);
boost::tokenizer<boost::char_separator<char> >::iterator token_iter;
map<string>numbermap;
for (token_iter = tokens.begin(); token_iter != tokens.end(); token_iter++)
numbermap.push_back(*token_iter);
boost 分割字符串并存入集合(类似php中的EXPLODE)
最新推荐文章于 2025-12-03 12:04:55 发布
458

被折叠的 条评论
为什么被折叠?



