List of utility methods to do String Unescape
String | unescape(String aString) Remove "escaped" chars from a string. if (aString == null) return null; String normalString = replace(aString, EQUAL_SIGN_ENTITY, EQUAL_SIGN); normalString = replace(normalString, LINE_FEED_ENTITY, LINE_FEED); normalString = replace(normalString, CARRIAGE_RETURN_ENTITY, CARRIAGE_RETURN); normalString = replace(normalString, LINE_TAB_ENTITY, LINE_TAB); return normalString; |
String | unescape(String aValue) Unescapes hex values in a URI query value. if (aValue == null) { return aValue; char[] chars = aValue.toCharArray(); StringBuffer buf = new StringBuffer(chars.length); for (int i = 0; i < chars.length; i++) { if (chars[i] == '%') { ++i; ... |
String | unescape(String data) unescape StringBuilder buffer = new StringBuilder(data.length()); for (int i = 0; i < data.length(); i++) { if ((int) data.charAt(i) > 256) { buffer.append("\\u").append(Integer.toHexString((int) data.charAt(i))); } else { if (data.charAt(i) == '\n') { buffer.append("\\n"); } else if (data.charAt(i) == '\t') { ... |
String | unescape(String elt) unescape if (elt.length() == 0 || (elt.indexOf('\\') < 0 && elt.indexOf('"') < 0)) { return elt.trim(); char[] elts = elt.toCharArray(); boolean escaped = false; boolean quoted = false; StringBuffer buf = new StringBuffer(elt.length()); int start = 0; ... |
String | unescape(String entry) Unescapes a given entry. String unescaped = entry.trim(); if (unescaped.startsWith("\"") && unescaped.endsWith("\"")) { unescaped = unescaped.substring(1, unescaped.length() - 1); unescaped = unescaped.replace("\"\"", "\""); return unescaped.trim(); |
String | unescape(String escaped) unescape boolean escaping = false; StringBuilder newString = new StringBuilder(); for (char c : escaped.toCharArray()) { if (!escaping) { if (c == ESCAPE_CHAR) { escaping = true; } else { newString.append(c); ... |
String | unescape(String escaped) Unescape all escape sequences in string (strip one level of backslashes). char[] source = escaped.toCharArray(); char[] dest = new char[source.length]; int j = 0; for (int i = 0; i < source.length; i++) { if ((source[i] != '\\') || (i > 0 && source[i - 1] == '\\')) { dest[j++] = source[i]; return new String(dest, 0, j); |
String | unescape(String escaped, char escape) Opposite of #escape(String,char,char) StringBuilder sb = new StringBuilder(escaped.length()); for (int i = 0, n = escaped.length(); i < n; i++) { char c = escaped.charAt(i); if (c == escape) { i++; c = escaped.charAt(i); sb.append(c); ... |
String | unescape(String escapedMessage) Returns a string with all escaped occurrence of StringUtils.SEPARATOR unescaped return unescape(escapedMessage, SEPARATOR);
|
String | unescape(String input) Method description return translateAll(input, encoded, decoded);
|