| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private static final long | |
| public static final String | LINE_SEP
the line separator for this OS |
| private static final long | |
| private static final long | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | Returns: true if the character sequence represented by the
argument is a suffix of the character sequence represented by
the StringBuffer object; false otherwise. Note that the
result will be true if the argument is the
empty string.the buffer to perform the check on buffer, String the suffix suffix)Checks that a string buffer ends up with a given string. |
| public static String | Returns: the stacktrace from the given exception.the exception to get the stacktrace from. t)Convenient method to retrieve the full stacktrace from a given exception. |
| public static String | Returns: the joined stringCollection of the data to be joined (may be null) collection, CharSequence Separator between elements (may be null) separator)Joins the string representation of the elements of a collection to a joined string with a given separator. |
| public static String | Returns: the joined stringArray of the data to be joined (may be null) array, CharSequence Separator between elements (may be null) separator)Joins the string representation of the elements of an array to a joined string with a given separator. |
| private static Collector | |
| public static Vector | |
| public static long | Returns: a long value representationthe amount as a human readable string. humanSize)Takes a human readable size representation eg 10K a long value. |
| public static String | Returns: the string with the prefixString for check string, String Prefix to remove prefix)Removes the prefix from a given string, if the string contains that prefix. |
| public static String | Returns: the string with the suffixString for check string, String Suffix to remove suffix)Removes the suffix from a given string, if the string contains that suffix. |
| public static String | Returns: the new string with replaced occurrences.the string to replace occurrences into data, String the occurrence to replace. from, String the occurrence to be used as a replacement. to)
Deprecated
Use
Replace occurrences into a string.
String#replace(CharSequence, CharSequence) now.
|
| public static String | Returns: converted stringraw string with possible embedded '\'s input)xml does not do "c" like interpretation of strings. |
| public static Vector | |
| public static String | Returns: null if the input string is null or empty or contain only empty spaces. It returns the input string without leading and trailing spaces otherwise.String to trim inputString)
|
| GIGABYTE | back to summary |
|---|---|
| private static final long GIGABYTE | |
| KILOBYTE | back to summary |
|---|---|
| private static final long KILOBYTE | |
| LINE_SEP | back to summary |
|---|---|
| public static final String LINE_SEP
Deprecated
the line separator for this OS | |
| MEGABYTE | back to summary |
|---|---|
| private static final long MEGABYTE | |
| PETABYTE | back to summary |
|---|---|
| private static final long PETABYTE | |
| TERABYTE | back to summary |
|---|---|
| private static final long TERABYTE | |
| StringUtils | back to summary |
|---|---|
| private StringUtils() constructor to stop anyone instantiating the class | |
| endsWith | back to summary |
|---|---|
| public static boolean endsWith(StringBuffer buffer, String suffix) Checks that a string buffer ends up with a given string. It may sound trivial with the existing JDK API but the various implementation among JDKs can make those methods extremely resource intensive and perform poorly due to massive memory allocation and copying. See
| |
| getStackTrace | back to summary |
|---|---|
| public static String getStackTrace(Throwable t) Convenient method to retrieve the full stacktrace from a given exception. | |
| join | back to summary |
|---|---|
| public static String join(Collection<?> collection, CharSequence separator) Joins the string representation of the elements of a collection to a joined string with a given separator.
| |
| join | back to summary |
|---|---|
| public static String join(Object[] array, CharSequence separator) Joins the string representation of the elements of an array to a joined string with a given separator.
| |
| joining | back to summary |
|---|---|
| private static Collector | |
| lineSplit | back to summary |
|---|---|
| public static Vector Splits up a string into a list of lines. It is equivalent
to | |
| parseHumanSizes | back to summary |
|---|---|
| public static long parseHumanSizes(String humanSize) throws Exception Takes a human readable size representation eg 10K a long value. Doesn't support 1.1K or other rational values. | |
| removePrefix | back to summary |
|---|---|
| public static String removePrefix(String string, String prefix) Removes the prefix from a given string, if the string contains that prefix. | |
| removeSuffix | back to summary |
|---|---|
| public static String removeSuffix(String string, String suffix) Removes the suffix from a given string, if the string contains that suffix. | |
| replace | back to summary |
|---|---|
| public static String replace(String data, String from, String to)
Deprecated Replace occurrences into a string.
| |
| resolveBackSlash | back to summary |
|---|---|
| public static String resolveBackSlash(String input) xml does not do "c" like interpretation of strings. i.e. \n\r\t etc. this method processes \n, \r, \t, \f, \\ also subs \s -> " \n\r\t\f" a trailing '\' will be ignored | |
| split | back to summary |
|---|---|
| public static Vector Splits up a string where elements are separated by a specific character and return all elements. | |
| trimToNull | back to summary |
|---|---|
| public static String trimToNull(String inputString) | |