|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.taco.text.StringPadder
public class StringPadder
A utility class for padding strings to fit a certain field width.
Constructor Summary | |
---|---|
protected |
StringPadder()
|
Method Summary | |
---|---|
static char[] |
padAlignLeft(java.lang.CharSequence cs,
int n)
Return a char array of length n , that has up to
n characters of the character sequence, padded with spaces
on the left if necessary. |
static char[] |
padAlignLeft(java.lang.CharSequence cs,
int n,
char padChar)
Return a char array of length n , that has up to
n characters of the character sequence, padded with
instances of padChar on the left if necessary |
static char[] |
padAlignRight(java.lang.CharSequence cs,
int n)
Return a char array of length n , that has up to
n characters of the character sequence, padded with spaces
on the right if necessary. |
static char[] |
padAlignRight(java.lang.CharSequence cs,
int n,
char padChar)
Return a char array of length n , that has up to
n characters of the character sequence, padded with
instances of padChar on the right if necessary |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected StringPadder()
Method Detail |
---|
public static final char[] padAlignLeft(java.lang.CharSequence cs, int n)
n
, that has up to
n
characters of the character sequence, padded with spaces
on the left if necessary.
public static final char[] padAlignLeft(java.lang.CharSequence cs, int n, char padChar)
n
, that has up to
n
characters of the character sequence, padded with
instances of padChar
on the left if necessary
public static final char[] padAlignRight(java.lang.CharSequence cs, int n)
n
, that has up to
n
characters of the character sequence, padded with spaces
on the right if necessary.
public static final char[] padAlignRight(java.lang.CharSequence cs, int n, char padChar)
n
, that has up to
n
characters of the character sequence, padded with
instances of padChar
on the right if necessary
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |