List of utility methods to do String Clean
String | cleanText(String text) clean Text String result = text.replaceAll("[\"()\n]", " "); result = result.trim(); result = result.replaceAll("( )+", " "); return result; |
String | cleanTextForCSV(final String input) clean Text For CSV if (input == null) return ""; return "\"" + input.replaceAll("\"", "\"\"") + "\""; |
String | toText(String content) Format the content for search results page if (content == null) { return ""; StringBuffer sb = new StringBuffer(); boolean gotSpace = false; for (int i = 0; i < content.length(); i++) { char a = content.charAt(i); if (a == '\r' || a == '\n' || a == '\t' || a == ' ') { ... |