Package sootup.core.util
Class StringTools
java.lang.Object
sootup.core.util.StringTools
Utility methods for string manipulations commonly used in sootup.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Convenience field storing the system line separator. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic char
getCFormatChar
(char c) Returns the canonical C-string representation of c.static String
getEscapedStringOf
(String fromString) Returns fromString, but with non-isalpha() characters printed as'\\unnnn'
.static String
getQuotedStringOf
(String fromString, boolean needsQuotes) Returns fromString, but with certain characters printed as if they were in a Java string literal.static String
Returns a String de-escaping the\\unnnn
representation for any escaped characters in the string.static String
getUnicodeStringFromChar
(char ch) Returns a String containing the escaped\\unnnn
representation 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\\unnnn
representation forch
. -
getUnEscapedStringOf
Returns a String de-escaping the\\unnnn
representation for any escaped characters in the string. -
getCFormatChar
public static char getCFormatChar(char c) Returns the canonical C-string representation of c.
-