List of utility methods to do String Unescape
String | unescape(String quoted) unescape StringBuilder buf = new StringBuilder(); int i = quoted.length(); for (int n = 0; n < i; n++) { char c = quoted.charAt(n); if (c != '\\') buf.append(c); else if (n < i - 1 && quoted.charAt(n + 1) == '\\') { buf.append(c); ... |
String | unescape(String s) unescape if (s == null) return null; if (s.equals("")) return null; StringBuilder result = new StringBuilder(s.length()); for (int i = 0; i < s.length(); i++) { if (s.charAt(i) == '\\') { if (i + 1 == s.length()) ... |
String | unescape(String s) Decodes a string escaped by the Internet Explorer's Javascript escape() method to a Unicode String. if (s == null || s.length() == 0) { return s; StringBuffer sb = new StringBuffer(s.length()); for (int i = 0; i < s.length(); ++i) { char c = s.charAt(i); switch (c) { case '%': ... |
String | unEscape(String s) un Escape String value = s; value = value.replaceAll("<", "<"); value = value.replaceAll(">", ">"); value = value.replaceAll("&", "&"); value = value.replaceAll(""", "\""); value = value.replaceAll("'", "'"); return value; |
String | unescape(String s) unescape StringBuffer sbuf = new StringBuffer(); int i = 0; int len = s.length(); while (i < len) { int ch = s.charAt(i); if (ch == '+') { sbuf.append(' '); } else if ('A' <= ch && ch <= 'Z') { ... |
String | unescape(String s) unescape if (s == null || s.length() == 0) return s; StringBuilder sb = new StringBuilder(); char prev_ch = 0; for (int i = 0, len = s.length(); i < len; i++) { char ch = s.charAt(i); switch (ch) { case '\\': ... |
String | unescape(String s) Unescape \n, \r, \t, and \0xxx unicode escapes int l = s.length(); StringBuffer dest = null; int i = 0; while (i < l - 1) { char c = s.charAt(i); if (c == '\\') { if (dest == null) { dest = new StringBuffer(l); ... |
String | Unescape(String s) Unescape if (s.startsWith(QUOTE) && s.endsWith(QUOTE)) { s = s.substring(1, s.length() - 2); if (s.contains(ESCAPED_QUOTE)) s = s.replace(ESCAPED_QUOTE, QUOTE); return s; |
String | unescape(String s) unescape return unescape(s, null);
|
String | unescape(String s) Resolve escape sequences in a String. if (s == null) { throw new IllegalArgumentException("The String to unescape may not be null."); StringBuilder sb = new StringBuilder(); boolean escaped = false; for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (escaped) { ... |