5 #include <boost/bind.hpp>
6 #include <boost/function.hpp>
7 #include <boost/algorithm/string.hpp>
8 #include <boost/foreach.hpp>
12 std::string delimeter)
14 boost::split(tokens, data, boost::is_any_of(delimeter));
17 typedef boost::function<void(std::string&,std::vector<std::string>&)>
TokenizerType;
20 std::string data =
"a\rb\rc\r";
21 std::vector<std::string> tokens;
22 std::string delimeter =
"\r";
27 BOOST_FOREACH(std::string token, tokens)
28 std::cout << token << std::endl;