List of utility methods to do String Unescape
String | unescape(String input) unescape StringBuilder builder = new StringBuilder(); int i = 0; while (i < input.length()) { char delimiter = input.charAt(i); i++; if (delimiter == '\\' && i < input.length()) { char ch = input.charAt(i); i++; ... |
String | unescape(String input, char escapeChar) unescape final StringBuilder out = new StringBuilder(); boolean escapeNext = false; for (char c : input.toCharArray()) { if (c == escapeChar && !escapeNext) { escapeNext = true; } else { out.append(c); escapeNext = false; ... |
String | unescape(String line) unescape if (line == null) { return null; StringBuffer sb = new StringBuffer(); for (int i = 0, n = line.length(); i < n; i++) { char c = line.charAt(i); if (c == '\\') { if (i == n - 1) { ... |
String | unescape(String line) Parse html/xml escape sequences line = line.replace("&", "&"); line = line.replace(""", "\""); line = line.replace(">", ">"); line = line.replace("<", "<"); return line; |
String | unescape(String line, int start, int end) unescape StringBuffer sb = new StringBuffer(); boolean escape = false; StringBuffer escBuf = new StringBuffer(); for (int i = start; i < end; i++) { char c = line.charAt(i); switch (c) { case '&': escape = true; ... |
String | unescape(String literal, String escapedChars) Removes all escape sequences in a string and return unescaped string escape character is backslash \, so \\ --> \, \' --> ' additional escaped characters can be allowed in escapedChars. char c = '?'; int i = 0; if (null == escapedChars) { escapedChars = "\\'"; if (null == literal) { return null; int len = literal.length(); if (len == 1 && literal.charAt(0) == '\\') { return null; if (len > 1 && literal.charAt(len - 2) != '\\' && literal.charAt(len - 1) == '\\') { return null; StringBuilder sb = new StringBuilder(len + 16); for (i = 0; i < len; i++) { c = literal.charAt(i); if (c == '\\') { char escChar = literal.charAt(i + 1); boolean matched = false; for (int j = 0; j < escapedChars.length(); j++) { if (escChar == escapedChars.charAt(j)) { sb.append(escChar); ++i; matched = true; break; if (!matched) { return null; } else { sb.append(literal.charAt(i)); return sb.toString(); |
String | unescape(String name) unescape name = name.replaceAll("'\\['", "["); name = name.replaceAll("'\\]'", "]"); name = name.replaceAll("\\'\\?\\'", "?"); name = name.replaceAll("\\'\\'", "'"); return name; |
String | unescape(String oldStr) unescape StringBuilder newStr = new StringBuilder(oldStr.length()); boolean backSlashPresent = false; for (int i = 0; i < oldStr.length(); i++) { int cp = oldStr.codePointAt(i); if (oldStr.codePointAt(i) > Character.MAX_VALUE) { i++; if (!backSlashPresent) { ... |
String | unescape(String original, char[] spec) unescape String n = original; for (char c : spec) { n = n.replace("\\" + c, "" + c); n = original.replace("\\\\", "\\"); return n; |
String | unescape(String property) Unescapes the property name return property.replace('$', '.'); |