List of utility methods to do Java String Unescape
String | unescapeJava(final String s) unescape java strings well enough for our purposes. final StringBuilder b = new StringBuilder(); final int n = s.length(); for (int i = 0; i < n;) { final char c = s.charAt(i++); if (c == '\\' && i < n) { final char e = s.charAt(i++); switch (e) { case 'u': { ... |
String | unescapeJava(final String str) unescape Java final char[] chars = str.toCharArray(); final StringBuilder sb = new StringBuilder(str.length()); for (int i = 0; i < chars.length; ++i) { char c = chars[i]; if (c != '\\') { sb.append(c); } else { ++i; ... |
String | unescapeJava(final String str) Unescape java. if (str == null) { return null; StringBuilder writer = new StringBuilder(str.length()); unescapeJava(writer, str); String result = writer.toString(); writer.setLength(0); return result; ... |
String | unescapeJava(String escaped) unescape Java if (escaped.indexOf("\\u") == -1) return escaped; String processed = ""; int position = escaped.indexOf("\\u"); while (position != -1) { if (position != 0) processed += escaped.substring(0, position); String token = escaped.substring(position + 2, position + 6); ... |
String | unescapeJava(String s) Turns a printable Java string literal (minus the quotes) into a string. final int sLength = s.length(); final StringBuilder result = new StringBuilder(sLength); for (int i = 0; i < sLength; ++i) { final char c = s.charAt(i); if (c == '\\' && i < sLength - 1) { char next = s.charAt(++i); if (next == 'n') { result.append('\n'); ... |
String | unescapeJava(String str) Unescapes any Java literals found in the if (str == null) { return null; int sz = str.length(); StringBuffer out = new StringBuffer(sz); StringBuffer unicode = new StringBuffer(UNICODE_LEN); boolean hadSlash = false; boolean inUnicode = false; ... |
String | unescapeJava(String value) unescape Java if (value == null || value.length() == 0) { return value; StringBuilder buf = null; int len = value.length(); int len1 = len - 1; for (int i = 0; i < len; i++) { char ch = value.charAt(i); ... |