en
Home About project

Remove line breaks with C++

To remove line breaks using C++ see example:

    #include <iostream>;
    #include <string>;
    .............................................
    string::size_type pos = 0;
    while ( ( pos = str.find ("\r\n",pos) ) != string::npos )
    {
    str.erase ( pos, 2 );
    }