I am writing a piece of software, and It require me to handle data I get from a webpage with libcurl. When I get the data, for some reason it has extra line breaks in it. I
Below code should work just fine for given string s. It's utilizing and libraries.
s
std::string s("He!!llo Wo,@rld! 12 453"); s.erase(std::remove_if(s.begin(), s.end(), [](char c) { return !std::isalnum(c); }), s.end());