Class Strings
java.lang.Object
edu.umd.cs.findbugs.util.Strings
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic StringEscape XML entities and illegal characters in the given string.static voidInitializes the map of characters to be escaped and their corresponding escape sequences.static booleanInitialize regular expressions used in unescaping.static StringTrim trailing comma from given string.static StringUnescape XML entities and illegal characters in the given string.
-
Constructor Details
-
Strings
public Strings()
-
-
Method Details
-
trimComma
-
initializeEscapeMap
public static void initializeEscapeMap()Initializes the map of characters to be escaped and their corresponding escape sequences. This method will be invoked automatically the first time a string is escaped/unescaped.- See Also:
-
escapeXml
Escape XML entities and illegal characters in the given string. This enhances the functionality of org.apache.commons.lang.StringEscapeUtils.escapeXml by escaping low-valued unprintable characters, which are not permitted by the W3C XML 1.0 specification.- Parameters:
s- a string- Returns:
- the same string with characters not permitted by the XML specification escaped
- See Also:
-
initializeUnescapePattern
public static boolean initializeUnescapePattern()Initialize regular expressions used in unescaping. This method will be invoked automatically the first time a string is unescaped. -
unescapeXml
Unescape XML entities and illegal characters in the given string. This enhances the functionality of org.apache.commons.lang.StringEscapeUtils.unescapeXml by unescaping low-valued unprintable characters, which are not permitted by the W3C XML 1.0 specification.- Parameters:
s- a string- Returns:
- the same string with XML entities/escape sequences unescaped
- See Also:
-
escapeLFCRBackSlash
-