Package sootup.core.util
Class StringTools
java.lang.Object
sootup.core.util.StringTools
Utility methods for string manipulations commonly used in sootup.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConvenience field storing the system line separator. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic chargetCFormatChar(char c) Returns the canonical C-string representation of c.static StringgetEscapedStringOf(String fromString) Returns fromString, but with non-isalpha() characters printed as'\\unnnn'.static StringgetQuotedStringOf(String fromString, boolean needsQuotes) Returns fromString, but with certain characters printed as if they were in a Java string literal.static StringReturns a String de-escaping the\\unnnnrepresentation for any escaped characters in the string.static StringgetUnicodeStringFromChar(char ch) Returns a String containing the escaped\\unnnnrepresentation forch.
-
Field Details
-
lineSeparator
Convenience field storing the system line separator.
-
-
Constructor Details
-
StringTools
public StringTools()
-
-
Method Details
-
getEscapedStringOf
Returns fromString, but with non-isalpha() characters printed as'\\unnnn'. -
getQuotedStringOf
Returns fromString, but with certain characters printed as if they were in a Java string literal. Used by StringConstant.toString() -
getUnicodeStringFromChar
Returns a String containing the escaped\\unnnnrepresentation forch. -
getUnEscapedStringOf
Returns a String de-escaping the\\unnnnrepresentation for any escaped characters in the string. -
getCFormatChar
public static char getCFormatChar(char c) Returns the canonical C-string representation of c.
-