Код: Выделить всё
String linesep = System.lineSeparator();
sometext.replace(linesep, linesep + " ");
Код: Выделить всё
sometext.replaceAll("\n\r?", System.lineSeparator() + " ")
Подробнее здесь: https://stackoverflow.com/questions/791 ... placeall-d
Мобильная версия