List of utility methods to do String Remove
String | removeAccents(String string) remove Accents return string == null ? null : Normalizer.normalize(string, Normalizer.Form.NFD).replaceAll( "\\p{InCombiningDiacriticalMarks}+", ""); |
String | removeBackslashes(String content) Removes unwanted backslashes characters if (content == null) { return null; StringBuffer buff = new StringBuffer(); buff.append(content); int len = buff.length(); for (int i = len - 1; i >= 0; i--) { if ('\\' == buff.charAt(i)) ... |
List | removeDuplicates(String[] first, String[] second) remove Duplicates List<String> result = new ArrayList<String>(Arrays.asList(first)); for (int i = 0; i < second.length; i++) { if (!result.contains(second[i])) { result.add(second[i]); return result; |
String | removeSpace(String str) remove Space if (!TextUtils.isEmpty(str)) { return str.trim().replaceAll(" ", ""); } else { return str; |
String | removeSuffix(String str, String suffix) remove Suffix if (null == str) return null; if ("".equals(str.trim())) return ""; if (null == suffix || "".equals(suffix)) return str; if (str.endsWith(suffix)) { return str.substring(0, str.length() - suffix.length()); ... |
String | removeWhitespace(String str) remove Whitespace if (isEmpty(str)) { return str; int sz = str.length(); char[] chs = new char[sz]; int count = 0; for (int i = 0; i < sz; i++) { if (!Character.isWhitespace(str.charAt(i))) { ... |
String | rmvSpace(String baseStr) rmv Space return baseStr.replace(" ", ""); |
String | rmvSpecial(String baseStr) rmv Special String rmvStr = baseStr; for (int i = 0; i < SPECIAL_CHARACTER_CODES.length; i++) { rmvStr = rmvStr.replaceAll(SPECIAL_CHARACTER_CODES[i], SPECIAL_CHARACTER_SYMBOLS[i]); return rmvStr; |
String | removeBlanks(String content) Removes unwanted blank characters if (content == null) { return null; StringBuffer buff = new StringBuffer(); buff.append(content); for (int i = buff.length() - 1; i >= 0; i--) { if (' ' == buff.charAt(i)) { buff.deleteCharAt(i); ... |
String | rmvBlankLines(String input) rmv Blank Lines return input.replaceAll("((\r\n)|\n)[\\s\t ]*(\\1)+", "$1"); |