protected static String replaceLineBreaks(String value, String lineBreak) {
    """
	Helper function to replace line breaks in a string with a custom value
	before printing.
	<p>
	This method may be used by inheriting classes, if the particular format
	does not support line breaks.
	
	@param value     value to replace
	@param lineBreak value, that is used for replacement of line breaks - if null, &lt;br/&gt;
	is used
	@return value with replaced line breaks
    """
        value = StringUtils.trimToNull(value);
        if (value == null) return null;
        if (lineBreak == null) lineBreak = "<br/>";
        Matcher m = LINES.matcher(value);
        StringBuilder out = new StringBuilder();
        while (m.find()) {
            out.append(StringUtils.trimToEmpty(m.group()));
            if (!m.hitEnd()) out.append(lineBreak);
        }
        return out.toString();
    }
protected static String replaceLineBreaks(String value, String lineBreak) {
        value = StringUtils.trimToNull(value);
        if (value == null) return null;
        if (lineBreak == null) lineBreak = "<br/>";
        Matcher m = LINES.matcher(value);
        StringBuilder out = new StringBuilder();
        while (m.find()) {
            out.append(StringUtils.trimToEmpty(m.group()));
            if (!m.hitEnd()) out.append(lineBreak);
        }
        return out.toString();
    }
protected static String replaceLineBreaks ( String value , String lineBreak ) { value = StringUtils . trimToNull ( value ) ; if ( value == null ) return null ; if ( lineBreak == null ) lineBreak = "<br/>" ; Matcher m = LINES . matcher ( value ) ; StringBuilder out = new StringBuilder ( ) ; while ( m . find ( ) ) { out . append ( StringUtils . trimToEmpty ( m . group ( ) ) ) ; if ( ! m . hitEnd ( ) ) out . append ( lineBreak ) ; } return out . toString ( ) ; }
Helper function to replace line breaks in a string with a custom value
before printing.
<p>
This method may be used by inheriting classes, if the particular format
does not support line breaks.

@param value     value to replace
@param lineBreak value, that is used for replacement of line breaks - if null, &lt;br/&gt;
is used
@return value with replaced line breaks
Helper function to replace line breaks in a string with a custom value before printing . <p > This method may be used by inheriting classes if the particular format does not support line breaks .