List of utility methods to do String Sanitize
String | sanitizeChatMessage(String message) sanitize Chat Message return message.replaceAll("(\\[|\\]|_|\\*|`)", "\\\\$1"); |
String | sanitizeClassname(String classname) sanitize Classname return classname.replace('.', '/').intern(); |
String | sanitizeClassName(String s) Removes package names in instances where Class#getSimpleName() cannot be called, i.e. return s.substring(s.lastIndexOf(".") + 1); |
String | sanitizeColumn(String colName, String relationName) sanitize Column return colName.contains(".") ? colName : relationName + "." + colName; |
String | sanitizeCompletion(String replace) sanitize Completion return replace == null ? null : replace.replaceAll(DOLLAR, ESCAPE_DOLLAR);
|
String | sanitizeDescription(String description) sanitize Description String prefix = "Maven GAV: "; int i1 = description.indexOf(prefix); if (i1 != -1) { int i2 = description.indexOf(" ", i1 + prefix.length()); if (i2 != -1) { description = description.substring(0, i1) + description.substring(i2); return description; |
String | sanitizeDir(String name) Takes a directory name and removes any illegal characters and shortens it to 64 characters if needed. name = name.replaceAll("[\\\\/:*?\\\"<>|" + "\\x00-\\x1F]", ""); name = name.trim(); if (name.length() > 64) name = name.substring(0, 64); return name; |
String | sanitizeFolderName(String s) sanitize Folder Name if (s == null) return null; s = s.replace(":", "__"); s = s.replace("/", "__"); s = s.replace("\\", "__"); s = s.replace(" ", "__"); s = s.replace("[", ""); s = s.replace("]", ""); ... |
String | sanitizeForCmisName(String in) sanitize For Cmis Name if (null == in || in.isEmpty()) { return null; in = in.replaceAll("[^a-zA-Z_0-9]", "_").replaceAll("_{2,}+", "_"); return in; |
String | sanitizeForCsv(String str) Sanitizes the string for comma-separated values (CSV) file output. We follow the definition described by RFC 4180: http://tools.ietf.org/html/rfc4180 return "\"" + str.replace("\"", "\"\"") + "\""; |