Skip empty tokens

This commit is contained in:
Magne Sjaastad 2017-11-06 22:18:23 +01:00
parent 5ab56bb2fb
commit 45d3fe5eaa

View File

@ -46,7 +46,10 @@ private:
std::string token; std::string token;
while (std::getline(ss, token, delimiter)) while (std::getline(ss, token, delimiter))
{ {
cont.push_back(token); if (token.find_first_not_of(delimiter) != std::string::npos)
{
cont.push_back(token);
}
} }
} }
}; };