public class StringUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
join(java.util.Collection parts,
java.lang.String delimiter)
Join the Strings within the parts Collection, inserting the delimiter in between elements
|
static java.lang.String |
padLeft(java.lang.String string,
int width)
Pad the specified String with spaces to the left to the specified width.
|
static java.lang.String |
padRight(java.lang.String string,
int width)
Pad the specified String with spaces to the right to the specified width.
|
public static java.lang.String padRight(java.lang.String string,
int width)
string - - the String to padwidth - - the target widthpublic static java.lang.String padLeft(java.lang.String string,
int width)
string - - the String to padwidth - - the target widthpublic static java.lang.String join(java.util.Collection parts,
java.lang.String delimiter)
parts - - the Collection of Strings to joindelimiter - - the delimiter String to insert between the parts