List of utility methods to do String Unescape
String | unescape(String value) Reverse the escaping of the control characters to get the original string. if (value == null) { return value; if (value.length() == 0) { return value; return value.replace(">", ">").replaceAll("<", "<").replaceAll("&", "&"); |
String | unescape(String value) If the string is enclosed in double or single quotes, the value inside the quotes is returned with all the escaped characters unescaped. if (value == null) return value; if (value.startsWith("\"")) { return value.substring(1, value.length() - 1).replaceAll("\\\"", "\""); } else if (value.startsWith("'")) { return value.substring(1, value.length() - 1).replaceAll("\\'", "'"); return value; ... |
String | unescape(String value) Unescape string if (value == null || value.length() == 0) { return value; StringBuffer buffer = new StringBuffer(); int pos = 0, max = value.length(); while (pos < max) { Character current = value.charAt(pos); if (current == '\\' && (pos + 1) < max) { ... |
String | unescape(String x) This finds any '%xx' and converts to the equivilent char. if (x.indexOf('%') < 0) { return x; char[] b = new char[2]; StringBuilder sb = new StringBuilder(x); for (int pos = 0; pos < sb.length(); pos++) { char c = sb.charAt(pos); if (c != '%') { ... |
void | unescape(StringBuilder escapedText, int index) Unescape html This method modify the StringBuilder in place. int start, end, table_index; start = escapedText.indexOf("&", index); if (start > -1) { end = escapedText.indexOf(";", start); index = start + 1; if (end > start) { String temp = escapedText.substring(start, end + 1); table_index = 0; ... |
String | unEscapeString(final String src) Unescapes the given source string. return unEscapeString(src, ESCAPE, COMMA);
|
String | unescapeString(String escapedString) Replaces all the printf-style escape sequences in a string with the appropriate characters. StringBuffer sb = new StringBuffer(); for (int i = 1; i < escapedString.length() - 1; ++i) { char c = escapedString.charAt(i); if (c == '\\') { ++i; sb.append(unescapeChar(escapedString.charAt(i))); } else { sb.append(c); ... |
String | unescapeString(String iccProfileSrc) unescape String if (iccProfileSrc.startsWith("\"") || iccProfileSrc.startsWith("'")) { iccProfileSrc = iccProfileSrc.substring(1); if (iccProfileSrc.endsWith("\"") || iccProfileSrc.endsWith("'")) { iccProfileSrc = iccProfileSrc.substring(0, iccProfileSrc.length() - 1); return iccProfileSrc; |
String | unescapeString(String in) unescape String if (in == null) { return null; return in.replace("<br/>", "\n").replace(" ", " ").replace("'", "\'").replace(""", "\"") .replace("<", "<").replace(">", ">"); |
String | unescapeString(String inp) Removes the first level of escapes from a string StringBuffer sb = new StringBuffer(); int size = inp.length(); for (int i = 0; i < size; i++) { char ch = inp.charAt(i); if (ch == '\\') { i++; if (i >= size) { throw new IllegalArgumentException( ... |