|
Boost Testing : |
Subject: [Boost-testing] String split behaviour
From: Venkateswara Rao Sanaka (moderncpp.venki_at_[hidden])
Date: 2015-05-20 14:32:16
Hi,
I am getting two empty strings from the following program,
void boost_split_test() {
const string &text("-");
vector<string> tokens;
split(tokens, text, boost::is_any_of("-"), token_compress_on);
cout << "size of tokens " << tokens.size() << '\n';
for (auto const &e : tokens)
cout << e.size() << '\n';
}
Output:
size of tokens 2
0
0
Is this expected output? I expecting an zero split parts. Could someone
clarify?
-- Thanks, :) Venki.