List of utility methods to do String Dequote
String | dequote(String string) Remove all quote characters from a specified String , including single (') and double (") quotes. if (string == null) { return null; } else { string = string.trim(); StringBuilder builder = new StringBuilder(); for (int i = 0; i < string.length(); i++) { char c = string.charAt(i); if (c != '\"' && c != '\'' && c != '`') { ... |
String | dequote(String text) dequote return text.substring(0, text.length());
|
String | dequote(String value) dequote if (isDoubleQuoted(value)) { value = value.substring(1, value.length() - 1); value = value.replaceAll("\"\"", "\""); if (value.equals(" ")) { return ""; return value; ... |
String | dequote(String value) dequote if (value.length() < 2) return value; char f = first(value); char l = last(value); if ((f == '"' && l == '"') || (f == '\'' && l == '\'')) { return value.substring(1, value.length() - 1); return value; ... |
String | dequoteFull(String str, char quote) Removes the surrounding quote and any double quote inside the string Example: "hello""world" becomes hello"world if (str == null) { return null; return dequoteFull(str, 0, str.length(), quote); |
String | dequoteIdentifier(String id) dequote Identifier if (id.startsWith(SINGLE_QUOTE_STRING) && id.endsWith(SINGLE_QUOTE_STRING)) { return id.substring(1, id.length() - 1); } else { return id; |
String | dequoteString(String s) dequoteString String dequoteStr = s.trim(); if (dequoteStr.startsWith("'") && dequoteStr.endsWith("'")) { dequoteStr = dequoteStr.substring(1); dequoteStr = dequoteStr.substring(0, dequoteStr.length() - 1); return dequoteStr; return s; |
String | dequoteString(String str) Replace quoted characters by their unquoted version. if (str.indexOf('\\') == -1) return str; char[] buf = str.toCharArray(); int pos = 0, num_deq = 0; while (pos < buf.length) { if (buf[pos] == '\\' && pos + 1 < buf.length) { System.arraycopy(buf, pos + 1, buf, pos, buf.length - pos - 1); num_deq++; ... |
String | dequoteString(String str) Removes matched quotes (single or double) from a string. if (str != null && str.length() > 1 && ((str.charAt(0) == '"' || str.charAt(0) == '\'') && str.charAt(str.length() - 1) == str.charAt(0))) { return str.substring(1, str.length() - 1); return str; |
String | dequoteString(String strVal) Replaces all html/xml expressions for newline and carriage return within the given string value with their java counterpart, namely '\n' and '\r'. String newStr = strReplace(strVal, " ", "\r"); return strReplace(newStr, " ", "\n"); |