List of utility methods to do String Quote
String | quoteStr(Object o) quote Str return "'" + o + "'"; |
String | quoteStrictOccurrences(final String textToMarkup, final String filter) quote Strict Occurrences String cur = ""; final String s = textToMarkup.toLowerCase(); for (String part : filter.split(" ")) { if (s.contains(part)) { cur += "\"" + part + "\" "; } else { cur += part + " "; return cur; |
String | quoteString(final String input) Surrounds a string with quotes. if (input == null) throw new IllegalArgumentException("String cannot be null!"); return '"' + input + '"'; |
String | quoteString(final String str) Surround the string with single quotes, and backquote any single quotes in the string. if (str == null) { return "null"; String outStr = str.replace("\"", "\\\""); if (outStr.contains("\n") || outStr.contains(",")) { outStr = "\"" + outStr + "\""; return outStr; ... |
String | quoteString(final String string) Quotes and escapes string for output to CSV format. if (string == null || string.isEmpty()) { return ""; return '"' + string.replace("\"", "\"\"") + '"'; |
String | quoteString(final String text) quote String if (text == null) { return null; final StringBuilder b = new StringBuilder(text.length()); final char[] chars = text.toCharArray(); b.append(QUOTE_CHAR); for (int i = 0; i < chars.length; i++) { final char c = chars[i]; ... |
String | quoteString(String arg) quote String StringBuilder argbuf = new StringBuilder(arg.length() + 2); return argbuf.append('"').append(arg).append('"').toString(); |
String | quoteString(String aTarget, String aPrefix, String aSuffix) quote String StringBuilder tStringBuilder = new StringBuilder(); tStringBuilder.append(aPrefix); tStringBuilder.append(aTarget); tStringBuilder.append(aSuffix); return tStringBuilder.toString(); |
String | quoteString(String in) Simple function to wrap quotes around a valid string. String ret = null; if (in != null) { final String QUOTE = "\""; ret = QUOTE + in + QUOTE; return ret; |
String | quoteString(String quoted, String quoteFlag) quote String assert quoteFlag != null; if (quoted == null) { return ""; } else { return quoteFlag + quoted + quoteFlag; |