List of utility methods to do String Unquote
String | unquote(String aString) unquote return aString.substring(1, aString.length() - 1).replace("\\\"", "\""); |
String | unquote(String entityName) unquote if (entityName.length() < 2) { return entityName; if (!(entityName.charAt(0) == SINGLE_QUOTE && entityName.charAt(entityName.length() - 1) == SINGLE_QUOTE)) { return entityName; if (entityName.indexOf('\'') == -1) { return entityName.substring(1, entityName.length() - 1); ... |
String | unquote(String in) unquote if (isEmpty(in)) return in; while (in.startsWith("\"") || in.startsWith("'")) in = in.substring(1); while (in.endsWith("\"") || in.endsWith("'")) in = in.substring(0, in.length() - 1); return in; |
String | unquote(String input, char quoteChar) If the input string starts and ends with quoteChar the starting and ending quoteChar will be removed. if (input == null) { return null; if (input.length() < 2) { return input; String unquoted = input; if (isQuoted(input, quoteChar)) { ... |
String | unquote(String literal) Removes all quotes at the beginning and ending of given string. String result = ""; if ((literal != null) && (literal.length() > 0)) { if (literal.charAt(0) != '\"') { if (literal.charAt(0) != '\'') { result = literal; } else { if (literal.trim().length() > 0) { result = literal.substring(1, literal.length() - 1); ... |
String | unquote(String maybeQuoted) Removes single or double quotes which surround a String. if (maybeQuoted == null || maybeQuoted.length() < 2) return maybeQuoted; boolean isQuoted = false; int len = maybeQuoted.length(); if (maybeQuoted.charAt(0) == '"' && maybeQuoted.charAt(len - 1) == '"') isQuoted = true; else if (maybeQuoted.charAt(0) == '\'' && maybeQuoted.charAt(len - 1) == '\'') isQuoted = true; ... |
String | unquote(String message) unquote if (message == null) return message; if (message.length() > 1) { if ((message.charAt(0) == '"' && message.charAt(message.length() - 1) == '"') || (message.charAt(0) == '\'' && message.charAt(message.length() - 1) == '\'')) return message.substring(1, message.length() - 1); return message; ... |
String | unquote(String name) Removes dollar ($) prefix from the given name if it exists if (!name.isEmpty() && name.charAt(0) == '$') { return name.substring(1); return name; |
String | unquote(String name) Return the unquoted version of name (stripping the start and end '`' characters if present). return isQuoted(name) ? name.substring(1, name.length() - 1) : name;
|
String | unquote(String quoted) unquote return quoted.replace("\"", ""); |