/** * Escapes control characters with a preceding backslash. * Encodes special chars as unicode escape sequence. * The resulting string is safe to be put into a Java string literal between * the quotes. */ public static String convertToJavaString(String theString) { return CONVERTER.convertToJavaString(theString, true); }
/** * Escapes control characters with a preceding backslash. * Encodes special chars as unicode escape sequence. * The resulting string is safe to be put into a Java string literal between * the quotes. */ public String convertToJavaString(String theString) { return convertToJavaString(theString, true); }
/** * Escapes control characters with a preceding backslash. * Optionally encodes special chars as unicode escape sequence. * The resulting string is safe to be put into a Java string literal between * the quotes. */ public static String convertToJavaString(String input, boolean useUnicode) { return CONVERTER.convertToJavaString(input, useUnicode); }