Mittwoch, 15. Mai 2019

How to remove line breaks etc. in Java String



myString.trim()
.replace("\n", "")
.replace("\r", "")
.replace(System.getProperty("line.separator"), "");

Keine Kommentare:

Kommentar veröffentlichen

NEW BLOG! http://cleancode.consulting/

Dear Reader, This Blog is closed and remains as an archive. Please find our new Blog at  http://cleancode.consulting/