0

How can I turn

std::string str = "My String\nhas multiple\nlines in it.";

into a std::vector<std::string> that looks like

{"My String", "has multiple", "lines in it."};

This post here Right way to split an std::string into a vector<string> only seems to work for spaces, not new lines.

0 Answers0