public final class OptionUtils
extends java.lang.Object
| Constructor | Description |
|---|---|
OptionUtils() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.String |
createPadding(int len) |
Return a String of padding of length
len. |
static int |
findWrapPos(java.lang.String text,
int width,
int startPos) |
Finds the next text wrap position after
startPos for the
text in text with the column width width. |
static java.lang.String |
rtrim(java.lang.String s) |
Remove the trailing whitespace from the specified String.
|
public static java.lang.String createPadding(int len)
len.len - the length of the String of padding to createpublic static java.lang.String rtrim(java.lang.String s)
s - the String to remove the trailing padding frompublic static int findWrapPos(java.lang.String text,
int width,
int startPos)
startPos for the
text in text with the column width width.
The wrap point is the last position before startPos+width having a
whitespace character (space, \n, \r). If there is no whitespace character
before startPos+width, it will return startPos+width.text - the text being searched for the wrap positionwidth - width of the wrapped textstartPos - position from which to start the lookup whitespace characterCopyright © 2008–2017 The Aspectran Project. All rights reserved.