List of utility methods to do String Unescape
String | unEscapeString(String input) un Escape String return input.replaceAll("&lt;", "<").replaceAll("&gt;", ">"); |
String | unescapeString(String input) Convert sequences of characters (into an input string) representing an escape sequence into the corresponding escape sequences StringBuilder buf = new StringBuilder(""); int i = 0; while (i < input.length()) { char currChar = input.charAt(i); if ((currChar == '\\') && (i < (input.length() - 1))) { char toAdd = 0; char nextChar = input.charAt(++i); if (nextChar == '0') { ... |
String | unescapeString(String oldstr) unescape_perl_string() Tom Christiansen It's completely ridiculous that there's no standard unescape_java_string function.
|
String | unescapeString(String s) Unescapes an escaped Unicode string. int backSlashIdx = s.indexOf('\\'); if (backSlashIdx == -1) { return s; int startIdx = 0; int sLength = s.length(); StringBuilder sb = new StringBuilder(sLength); while (backSlashIdx != -1) { ... |
String | unescapeString(String s) unescape String if (s.indexOf('\\') == -1) { return s; StringBuilder sb = new StringBuilder(s.length()); for (int i = 0; i < s.length(); i++) { char ch = s.charAt(i); if (ch == '\\') { int j = i + 1; ... |
String | unescapeString(String s) unescape String String value = s; value = value.replaceAll("^((?<!\\\\) )*", ""); value = value.replaceAll("((?<!\\\\) )*$", ""); value = value.replaceAll("\\\\(\\\\\\\\)* ", " "); value = value.replaceAll("\\\\(\\\\\\\\)*,", ","); return value; |
String | unescapeString(String s, char enclosed) unescape String if (s.charAt(0) != enclosed) return s; String reg = "\\\\" + enclosed; String replaced = s.replaceAll(reg, Character.toString(enclosed)); return replaced.substring(1, replaced.length() - 1); |
String | unEscapeString(String str) Unescape commas in the string using the default escape char return unEscapeString(str, ESCAPE_CHAR, COMMA);
|
char | unEscapeString(String str) un Escape String if (str.equalsIgnoreCase("<")) return '<'; else if (str.equalsIgnoreCase(">")) return '>'; else if (str.equalsIgnoreCase("&")) return '&'; else if (str.equalsIgnoreCase(""")) return '\"'; ... |
String | unescapeString(String str) unescape String return unescapeString(str, false, true);
|