ua
Головна Про проект

Видалення розривів рядків у C++

Приклад видалення розривів рядків у C++:

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