List of utility methods to do String Quote
String | quoteIfNotNull(String str) quote If Not Null return str = (str != null) ? str = "'" + escapeApostrophe(str) + "'" : null; |
String | quoteIfNotNull(String text) quote If Not Null return (text != null ? "'" + text + "'" : text); |
void | quoteIfNotNull(StringBuilder sb, String val) quote If Not Null if (val == null) sb.append("null"); else sb.append("'").append(val).append("'"); |
Object | quoteIfString(Object obj) quote If String return (obj instanceof String) ? quote((String) obj) : obj; |
Object | quoteIfString(Object obj) Turn the given Object into a String with single quotes if it is a String; keeping the Object as-is else. return (obj instanceof String ? quote((String) obj) : obj); |
Object[] | quoteIfString(Object... arguments) quote If String Object[] result = new Object[arguments.length]; for (int i = 0; i < arguments.length; i++) { result[i] = quoteIfString(arguments[i]); return result; |
String | quoteImpl(String s, char delim) quote Impl if (s == null) return null; StringBuffer sb = new StringBuffer(s.length() + 3); sb.append(delim); for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (c == delim) sb.append(delim); ... |
String | quoteIt(String orig) Quote it. String result = replace(orig, " ", "\\ "); return result; |
String | quoteJava(String s) Convert string to Java-compatible source form. StringBuilder b = new StringBuilder(); b.append('"'); quoteJavaContent(s, b); b.append('"'); return b.toString(); |
String | quoteJavascriptString(String s) quote Javascript String s = s.replaceAll("\\\\", "\\\\\\\\").replaceAll("\"", "\\\\\""); return quote(s); |