public class Strings extends Object
| Constructor and Description |
|---|
Strings() |
| Modifier and Type | Method and Description |
|---|---|
static String |
escapeLFCRBackSlash(String s) |
static String |
escapeXml(String s)
Escape XML entities and illegal characters in the given string.
|
static void |
initializeEscapeMap()
Initializes the map of characters to be escaped and their corresponding
escape sequences.
|
static boolean |
initializeUnescapePattern()
Initialize regular expressions used in unescaping.
|
static String |
replace(String source,
String find,
String repl)
Deprecated.
|
static String |
toString(Object[] a)
Deprecated.
|
static String |
trimComma(String s)
Trim trailing comma from given string.
|
static String |
unescapeXml(String s)
Unescape XML entities and illegal characters in the given string.
|
@Deprecated public static String replace(String source, String find, String repl)
source.replace(find, repl) but also compatible with JDK 1.4.source - The String on which to operatefind - The literal substring to be replacedrepl - The literal replacement substringNullPointerException - if any of the arguments are nullIllegalArgumentException - if find has zero lengthString.replace(CharSequence target, CharSequence
replacement)@Deprecated public static String toString(Object[] a)
Arrays.toString(a) but
also compatible with JDK 1.4. This concatenates the results of calling
String.valueOf() on each element of the array, so this won't work well
for multi-dimensional arrays.public static String trimComma(String s)
s - a stringpublic static void initializeEscapeMap()
public static String escapeXml(String s)
s - a stringpublic static boolean initializeUnescapePattern()
public static String unescapeXml(String s)
s - a stringCopyright © 2003–2015. All rights reserved.