List of utility methods to do String Quote
String | quote(String string, String charsToQuote) Quotes characters charsToQuote in string by prepending a backslash.
char[] chars = string.toCharArray(); StringBuffer result = new StringBuffer(); for (int i = 0; i < string.length(); i++) { if (charsToQuote.indexOf(chars[i]) != -1) result.append('\\'); result.append(chars[i]); return result.toString(); ... |
void | quote(String string, StringBuilder w) Produce a string in double quotes with backslash sequences in all the right places. if (string == null || string.length() == 0) { w.append("\"\""); return; char b; char c = 0; String hhhh; int i; ... |
String | quote(String tableName) quote String[] parts = tableName.split("\\."); StringBuffer sb = new StringBuffer(); for (String part : parts) { sb.append("\"").append(part).append("\"").append("."); sb.setLength(sb.length() - 1); return sb.toString(); |
String | quote(String text) quote StringBuffer buffer = new StringBuffer(); buffer.append(SINGLE_QUOTE); buffer.append(text); buffer.append(SINGLE_QUOTE); return buffer.toString(); |
String | quote(String text) Puts a String text in quotes. return "\"" + text + "\""; |
String | quote(String text) quote return "\"" + text + "\""; |
String | quote(String text) quote return new StringBuffer("\"").append(text).append("\"").toString(); |
String | quote(String text) quote StringBuilder buf = new StringBuilder(); buf.append("\""); for (int i = 0; i < text.length(); i++) { char c = text.charAt(i); switch (c) { case '\'': buf.append("\\'"); break; ... |
String | quote(String text) Quotes the provided value as a JavaScript string literal. StringBuilder result = new StringBuilder(text.length() * 2); result.append(APOS); for (char ch : text.toCharArray()) { switch (ch) { case APOS: case QUOTE: case SLASH: result.append(SLASH); ... |
String | quote(String text, String quote) Wraps the text in the given quote text return quote + text + quote;
|