public final class LineWrapper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
wrap(java.lang.CharSequence _str,
int _width,
java.lang.CharSequence _newLineSeq)
Wraps the input sequence
_str to the specified _width identifying words by space.Leading spaces on new lines are stripped, while trailing spaces are left unmodified. |
static java.util.List<java.lang.String> |
wrapIntoList(java.lang.CharSequence _str,
int _width)
Wraps the input sequence
_str into a list of lines of the specified _width identifying words by space.Leading spaces on new lines are stripped, while trailing spaces are left unmodified. |
public static java.lang.String wrap(java.lang.CharSequence _str,
int _width,
java.lang.CharSequence _newLineSeq)
_str to the specified _width identifying words by space._str - the input sequence to be wrapped (may be null or empty)_width - the width to wrap the words at (if less than 1 defaults to 1)_newLineSeq - the character sequence to insert for a new line,
null uses the system-dependent line separator string_newLineSeq, null if null inputpublic static java.util.List<java.lang.String> wrapIntoList(java.lang.CharSequence _str,
int _width)
_str into a list of lines of the specified _width identifying words by space._str - the input sequence to be wrapped (may be null or empty)_width - the width to wrap the words at (if less than 1 defaults to 1)null