split 分隔字符串


#include <boost/algorithm/string.hpp>

string in_path = "test1,test2,test3,test4,test5";


std::vector<std::string> m_currentPath; 

boost::algorithm::split(m_currentPath, in_path, boost::algorithm::is_any_of(",")); 

 for(size_t i = 0;i<m_currentPath.size();i++) 
{ 
    std::cout<<m_currentPath[i]<<std::endl;  
}  


你可能感兴趣的:(Algorithm,String,Path,include,IM)