List of utility methods to do String Quote Unescape
String | unescapeQuotes(String text) unescape Quotes return text.replaceAll("\\\\" + QUOTE, QUOTE); |
String | unescapeQuotes(String value) unescape Quotes if (value.startsWith("\"") && value.endsWith("\"")) { return value.substring(1, value.length() - 1); return value; |
String | unescapeQuotesAndBackSlash(String path, boolean isSingleQuoteUnescape) This method un escapes backslash, double quotes and single quotes (keeping replacement of \\\\\' to ' as is so as to maintain backward compatibility any serialization/deserialization) path = (isSingleQuoteUnescape) ? path.replace("\\\"", "\"").replace("\\\\\'", "'") : path.replace("\\\\\"", "\"").replace("\\\'", "'"); return path.replace("\\\\", "\\"); |
String | unescapeQuotesWithBackslash(final String value) unescape Quotes With Backslash return value.replaceAll("\\\\\"", "\\\""); |
String | unescapeSingleQuoteAndBackslash(String str) unescape Single Quote And Backslash char[] chars = str.toCharArray(); StringBuffer result = new StringBuffer(); for (int i = 0; i < chars.length; i++) { char b = chars[i]; switch (b) { case '\\': switch (chars[++i]) { case '\\': ... |