Skip to content

Instantly share code, notes, and snippets.

@cdglove
Last active August 29, 2015 14:17
void tokenize_csv(std::string raw_csv, std::set<std::string>& dest_set)
{
boost::tokenizer<boost::escaped_list_separator<char>> value_list(raw_csv);
boost::transform(
value_list,
std::inserter(dest_set, dest_set.begin()),
std::bind(boost::trim_all_copy<std::string>, std::placeholders::_1, std::locale())
);
dest_set.erase("");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment