public class StringHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
EOL_PATTERN
The end-of-line pattern.
|
Constructor and Description |
---|
StringHelper() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
trimMultiLineText(java.lang.String text)
Canonize multi-line texts so that each individual line is trimmed.
|
static java.lang.String |
trimMultiLineText(java.lang.String text,
boolean trimEnds)
Canonize multi-line texts so that each individual line is trimmed.
|
public static final java.util.regex.Pattern EOL_PATTERN
public static java.lang.String trimMultiLineText(java.lang.String text)
text
- text possibly consisting of more than one line, a null
text will return null
public static java.lang.String trimMultiLineText(java.lang.String text, boolean trimEnds)
text
- text possibly consisting of more than one line, a null
text will return null
trimEnds
- trim away empty lines at the beginning and the end?