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
The following works for me.
str.erase(std::remove_if(str.begin(), str.end(), &ispunct), str.end()); str.erase(std::remove_if(str.begin(), str.end(), &isspace), str.end());