public class Strings
extends java.lang.Object
Constructor and Description |
---|
Strings() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
escapeLFCRBackSlash(java.lang.String s) |
static java.lang.String |
escapeXml(java.lang.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 java.lang.String |
replace(java.lang.String source,
java.lang.String find,
java.lang.String repl)
Deprecated.
|
static java.lang.String |
toString(java.lang.Object[] a)
Deprecated.
|
static java.lang.String |
trimComma(java.lang.String s)
Trim trailing comma from given string.
|
static java.lang.String |
unescapeXml(java.lang.String s)
Unescape XML entities and illegal characters in the given string.
|
@Deprecated public static java.lang.String replace(java.lang.String source, java.lang.String find, java.lang.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 substringjava.lang.NullPointerException
- if any of the arguments are nulljava.lang.IllegalArgumentException
- if find
has zero lengthString.replace(CharSequence target, CharSequence
replacement)
@Deprecated public static java.lang.String toString(java.lang.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.String.valueOf(Object)
,
Arrays.toString(Object[])
,
Arrays.deepToString(Object[])
public static java.lang.String trimComma(java.lang.String s)
s
- a stringpublic static void initializeEscapeMap()
public static java.lang.String escapeXml(java.lang.String s)
s
- a stringpublic static boolean initializeUnescapePattern()
public static java.lang.String unescapeXml(java.lang.String s)
s
- a stringpublic static java.lang.String escapeLFCRBackSlash(java.lang.String s)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.