List of utility methods to do String Unescape
String | unEscapeString(String str) un Escape String if (str == null) return null; str = str.replaceAll("%20", " "); str = str.replaceAll("%3C", "<"); str = str.replaceAll("%3E", ">"); str = str.replaceAll("%23", "#"); str = str.replaceAll("%7B", "{"); str = str.replaceAll("%7D", "}"); ... |
String | unescapeString(String string) Retira o escape de barras invertidas e de aspas duplas de uma string, nesta ordem. return unescapeDoubleQuote(unescapeReverseSolidus(string));
|
String | unescapeString(String string, String escapeChars, char escapeSymbol) Removes occurrences of an escape character from a string. if (string == null || string.isEmpty() || (escapeChars != null && escapeChars.isEmpty())) { return string; StringBuilder sb = new StringBuilder(string.length()); for (int i = 0; i < string.length(); i++) { char c = string.charAt(i); if (c == escapeSymbol && i < string.length() - 1) { char c2 = string.charAt(i + 1); ... |
String | unescapeString(String t) unescape String StringBuilder r = new StringBuilder(); int length = t.length(); int j = 0; while (j < length) { char c = t.charAt(j); if (c == '\\') { c = t.charAt(++j); switch (c) { ... |
String | unescapeString(String text) Effectively un-escapes a string, performs the reverse of #escapeString(String) . if (!needsUnEscaping(text)) { return text; String unescaped = text.replaceAll("\\\\n", "\n"); unescaped = unescaped.replaceAll("\\\\r", "\r"); unescaped = unescaped.replaceAll("\\\\N", "\n"); unescaped = unescaped.replaceAll("\\\\\\\\", "\\\\"); unescaped = unescaped.replaceAll("\\\\,", ","); ... |
String | unescapeString(String text) Effectively un-escapes a string, performs the reverse of #escapeString(String) . String unescaped = text.replaceAll("\\\\n", "\n"); unescaped = unescaped.replaceAll("\\\\N", "\n"); unescaped = unescaped.replaceAll("\\\\\\\\", "\\\\"); unescaped = unescaped.replaceAll("\\\\,", ","); unescaped = unescaped.replaceAll("\\\\;", ";"); unescaped = unescaped.replaceAll("\\\\:", ":"); return unescaped; |
String | unescapeString(String text) unescape String if (text == null) { return null; if (text.length() >= 2 && text.startsWith("\"") && text.endsWith("\"")) { text = text.substring(1, text.length() - 1); if (text.indexOf('\\') >= 0) { StringBuilder r = new StringBuilder(); ... |
String | unescapeString(String txt) unescape String txt = txt.replace("&xd;", "\r"); txt = txt.replace("&xa;", "\n"); return txt; |
String | unescapeText(String s) unescape Text StringBuffer text = new StringBuffer(s); boolean more = true; while (more) { int i = text.toString().indexOf("\\\""); if (i != -1) { text.replace(i, i + 2, "\""); } else { more = false; ... |
String | unescapeText(String s) Replaces &-excape sequences required by HTML and XML with the character represented by the escape sequence (& < > " and '). StringBuffer sb = new StringBuffer(); int oldIndex = 0; int index = s.indexOf('&'); while (index >= 0) { sb.append(s.substring(oldIndex, index)); if (s.startsWith("&", index)) { sb.append('&'); oldIndex = index + 5; ... |