public interface Strings
| Modifier and Type | Field and Description |
|---|---|
static java.text.DecimalFormat |
decimalFormat
Decimal format for floating numbers.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
decimal(double x)
Returns the decimal string representation of a floating number.
|
static java.lang.String |
fill(char ch,
int len)
Returns a string with a single repeated character to a specific length.
|
static boolean |
isNullOrEmpty(java.lang.String str)
Returns true if the string is null or empty.
|
static java.lang.String |
leftPad(java.lang.String str,
int size,
char padChar)
Left pad a String with a specified character.
|
static java.lang.String |
ordinal(int i)
Returns the string representation of ordinal number with suffix.
|
static double[] |
parseDoubleArray(java.lang.String s)
Parses a double array in format '[1.0, 2.0, 3.0]'.
|
static int[] |
parseIntArray(java.lang.String s)
Parses a double array in format '[1.0, 2.0, 3.0]'.
|
static java.lang.String |
rightPad(java.lang.String str,
int size,
char padChar)
Right pad a String with a specified character.
|
static java.lang.String |
toString(double[] a)
Returns the string representation of array in format '[1.0, 2.0, 3.0]'."
|
static java.lang.String |
toString(int[] a)
Returns the string representation of array in format '[1, 2, 3]'."
|
static final java.text.DecimalFormat decimalFormat
static boolean isNullOrEmpty(java.lang.String str)
static java.lang.String ordinal(int i)
static java.lang.String leftPad(java.lang.String str,
int size,
char padChar)
str - the String to pad out, may be nullsize - the size to pad topadChar - the character to pad withstatic java.lang.String rightPad(java.lang.String str,
int size,
char padChar)
str - the String to pad out, may be nullsize - the size to pad topadChar - the character to pad withstatic java.lang.String fill(char ch,
int len)
static java.lang.String decimal(double x)
static java.lang.String toString(int[] a)
static java.lang.String toString(double[] a)
static int[] parseIntArray(java.lang.String s)
static double[] parseDoubleArray(java.lang.String s)