I need to tokenize (' ','\n','\t' as delimiter) a text with somethink like
std::string text = "foo bar";
boost::iterator_range<std::string::iterator> r = some_func_i_dont_know(text);
Later I want to get output with:
for (auto i: result)
std::cout << "distance: " << std::distance(text.begin(), i.begin())
<< "\nvalue: " << i << '\n';
What produces with example above:
distance: 0
value: foo
distance: 6
value: bar
Thanks for any help.