private static String stripExtraLineEnd ( String text , boolean formalRTF ) { if ( formalRTF && text . endsWith ( "\n" ) ) { text = text . substring ( 0 , text . length ( ) - 1 ) ; } return text ; }
Remove the trailing line end from an RTF block .