public interface Strings
| Modifier and Type | Field and Description |
|---|---|
static java.text.DecimalFormat |
decimal
Decimal format for floating numbers.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
fill(char ch,
int len)
Returns a string with a single repeated character to a specific length.
|
static java.lang.String |
format(double x)
Returns the string representation of a floating number without trailing zeros.
|
static java.lang.String |
format(double x,
boolean trailingZeros)
Returns the string representation of a floating number.
|
static java.lang.String |
format(float x)
Returns the string representation of a floating number without trailing zeros.
|
static java.lang.String |
format(float x,
boolean trailingZeros)
Returns the string representation of a floating number.
|
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(float[] 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 decimal
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 format(float x)
static java.lang.String format(float x,
boolean trailingZeros)
static java.lang.String format(double x)
static java.lang.String format(double x,
boolean trailingZeros)
static java.lang.String toString(int[] a)
static java.lang.String toString(float[] a)
static java.lang.String toString(double[] a)
static int[] parseIntArray(java.lang.String s)
static double[] parseDoubleArray(java.lang.String s)