I’m stuck with this simple problem.
Say I have a string which is consisted from characters [0-9]. What I would like to do is split the string by the single characters using boost::split.
std::string str = "0102725";
std::vector<std::string> str2;
boost::split(str2, str, boost::is_any_of(SOMETHING));
I’m looking for SOMETHING so that str2[0] contains “0”, str2[1] contains “1”, str2[2] contains “0” and so on. So far I have tried “”, ‘:’ and “:” but no luck…
boost::splitis overkill for that.