List of utility methods to do String Strip
String | stripCharacter(String inputString, char stripCharacter) Strip the given String with the given character return inputString.replaceAll( Pattern.quote(Character.toString(stripCharacter)), ""); |
String | stripCharacters(String inputString, String stripCharacters) Strip the given String with the given String characters char[] charArray = stripCharacters.toCharArray(); for (char c : charArray) { inputString = inputString.replace(String.valueOf(c), ""); return inputString; |
String | stripControlCharacters(Object value) Strip an Object of it's ISO control characters. if (value == null) { return null; return stripControlCharacters(value.toString()); |
String | stripControlCharacters(String value) Strip a String of it's ISO control characters. boolean hasControlChars = false; for (int i = value.length() - 1; i >= 0; i--) { if (Character.isISOControl(value.charAt(i))) { hasControlChars = true; break; if (!hasControlChars) { ... |
String | stripEnd(String str, String stripChars) strip End int end; if (str == null || (end = str.length()) == 0) { return str; if (stripChars == null) { while ((end != 0) && Character.isWhitespace(str.charAt(end - 1))) { end--; ... |
String | stripEnd(String str, String stripChars) strip End int end; if (str == null || (end = str.length()) == 0) { return str; if (stripChars == null) { while ((end != 0) && Character.isWhitespace(str.charAt(end - 1))) { end--; ... |
String | stripStart(String str, String stripChars) strip Start int strLen; if (str == null || (strLen = str.length()) == 0) { return str; int start = 0; if (stripChars == null) { while ((start != strLen) && Character.isWhitespace(str.charAt(start))) { ... |
String | stripStart(String str, String stripChars) strip Start int strLen; if (str == null || (strLen = str.length()) == 0) { return str; int start = 0; if (stripChars == null) { while ((start != strLen) && Character.isWhitespace(str.charAt(start))) { ... |