Java Utililty Methods String Double Quote

List of utility methods to do String Double Quote

Description

The list of methods to do String Double Quote are organized into topic(s).

Method

StringdoubleQuote(Object thing)
Surrounds given object's Object#toString() with double quotes.
return thing == null ? (String) null
        : new StringBuilder().append(DOUBLE_QUOTE).append(thing).append(DOUBLE_QUOTE).toString();
StringdoubleQuote(String data)
Double quotes a string
return "\"" + data + "\"";
StringdoubleQuote(String input)
Adds a double quotation to the input value
return "\"" + input + "\"";
StringdoubleQuote(String message)
double Quote
return quote(message, DOUBLE_QUOTE);
StringdoubleQuote(String s)
Place double quotes arround input string, Escape single quotes that will cause problems.
if (s == null)
    return "NULL";
StringBuilder sb = new StringBuilder();
sb.append('"');
for (int i = 0; i < s.length(); i++) {
    char ch = s.charAt(i);
    if (ch == '\'')
        sb.append("\\'"); 
...
StringdoubleQuote(String s)
double Quote
return "\"" + s + "\"";
StringdoubleQuote(String str)
double Quote
int pos = str.indexOf('\'');
if (pos != -1) {
    str = str.substring(0, pos + 1) + "'" + doubleQuote(str.substring(pos + 1));
return str;
StringdoubleQuote(String str)
double Quote
return quote(str, '"');
Stringdoublequote(String str, boolean escapeHtml)
doublequote
if (str == null) {
    return null;
return quote(str, escapeHtml);
StringdoubleQuote(String string)
Quotes a string if it contains special characters.
return quote(string, "\"");