public class StringUtil
extends java.lang.Object
| Constructor and Description |
|---|
StringUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
insertString(java.lang.String source,
java.lang.String newEntry,
int position)
Insert a string in a middle of another string
|
static boolean |
isEmpty(java.lang.String source)
Check if a string is empty or null
|
static java.lang.String |
removeCharAt(java.lang.String source,
int position)
Remove a character in a String
|
static java.lang.String |
safeToString(java.lang.Object source)
Returns a "safe" string representation.
|
static java.lang.String |
stackStraceAsString(java.lang.Throwable exception)
Converts exception stack trace as string
|
public static java.lang.String safeToString(java.lang.Object source)
source - source stringnull, or an empty string otherwisepublic static boolean isEmpty(java.lang.String source)
source - source stringtrue is the string is empty or null,
false otherwisepublic static final java.lang.String stackStraceAsString(java.lang.Throwable exception)
exception - exception to convertpublic static java.lang.String insertString(java.lang.String source,
java.lang.String newEntry,
int position)
source - source stringnewEntry - string to insert into sourceposition - position to insert sourcepublic static java.lang.String removeCharAt(java.lang.String source,
int position)
source - source stringposition - position of the character to remove