public final class StringUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
decrypt(java.lang.String str)
Decrypts a string encrypted with encrypt.
|
static java.lang.String |
encrypt(java.lang.String str)
Encrypt the given string in a way which anybody having access to this method algorithm can
easily decrypt.
|
static java.lang.String |
getErrorMessage(java.lang.Throwable t)
Returns the error message associated with the given Throwable.
|
static java.lang.String |
getStackTrace(java.lang.Throwable e)
Returns the exception stack trace as a String.
|
static java.lang.String |
join(java.lang.Object[] objs,
java.lang.String sep)
Joins the given object array in one string, each separated by the given separator.
|
static java.lang.String |
repeat(java.lang.String str,
int count) |
static java.lang.String |
uncapitalize(java.lang.String string) |
public static java.lang.String uncapitalize(java.lang.String string)
public static java.lang.String getErrorMessage(java.lang.Throwable t)
NullPointerException
for instance.t
- the throwable to get the error message frompublic static java.lang.String getStackTrace(java.lang.Throwable e)
e
- the exception to get the stack trace from.public static java.lang.String join(java.lang.Object[] objs, java.lang.String sep)
join(new String[] {"one", "two", "three"}, ", ") -> "one, two, three"
objs
- The array of objects (toString()
is used).sep
- The separator to use.public static final java.lang.String encrypt(java.lang.String str)
str
- the string to encryptpublic static final java.lang.String decrypt(java.lang.String str)
str
- the encrypted string to decryptpublic static java.lang.String repeat(java.lang.String str, int count)