protected String harmonizeNewlines ( final String original ) { final String toReturn = original . trim ( ) . replaceAll ( "[\r\n]+" , "\n" ) ; return toReturn . endsWith ( "\n" ) ? toReturn : toReturn + "\n" ; }
Squashes newline characters into