public final class StringUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
degreeSymbol |
static String |
lowercaseSigma |
static String |
superscriptTwo |
static String |
whiteBox |
static String |
whiteCircle |
static String |
whiteDiamond |
Modifier and Type | Method and Description |
---|---|
static String |
decimalFormat(double d,
int numDecimalPlaces) |
static String |
formatByteCount(long numBytes) |
static String |
getFilenameExtension(String filename)
Get the extension of a file.
|
static String |
getStackTraceString(Throwable t)
Returns the stack trace of an exception in the form of a string.
|
static String |
join(String separator,
String... strings)
Joins strings with given separator between each pair.
|
static String |
removeFilenameExtension(String filename)
Removes the filename extension from a filename, if there is one.
|
static String |
repeat(String val,
int rep)
Repeats a given string a specified number of times.
|
static String[] |
split(String s,
char delimiter)
This method splits a String into an array of values, the values being delimited with the given character.
|
static String |
toString(double[] a) |
static String |
toString(int[] a) |
static String |
toString(long[] a) |
public static final String degreeSymbol
public static final String superscriptTwo
public static final String lowercaseSigma
public static final String whiteBox
public static final String whiteCircle
public static final String whiteDiamond
public static String[] split(String s, char delimiter)
s
- the String to be split. If s is null then the returned array is also null.delimiter
- the delimiter character used to separate values.String.split(String)
public static String join(String separator, String... strings)
public static String removeFilenameExtension(String filename)
For example "foo.txt" gives "foo", while "foo.java.txt" gives "foo.java".
public static String repeat(String val, int rep)
public static String toString(int[] a)
public static String toString(long[] a)
public static String toString(double[] a)
public static String getFilenameExtension(String filename)
public static String getStackTraceString(Throwable t)
public static String decimalFormat(double d, int numDecimalPlaces)
public static String formatByteCount(long numBytes)
Copyright © 2016 Metron, Inc.. All rights reserved.