$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: abir basak (abirbasak_at_[hidden])
Date: 2007-02-16 05:39:13
Hi,
I want to tokenize a string based on one or multiple space or tab
std::string s = " a b c d \te ";
std::vector<std::string> tokens;
boost::algorithm::split(tokens,s,boost::algorithm::is_any_of("
\t"),token_compress_on);
copy(tokens.begin(),tokens.end(),ostream_iterator<string>(cout,"\n"));
This gives more or less correct result, except it does not remove space/
tab from begin /end.
It can be done like trim(s); and then call the above.
But is there any other way it can be done in split itself ?