List of utility methods to do String Trim Right
String | rtrim(String s, Character c) rtrim if (s == null) { return null; if (c == null) { return s; int len = s.length(); int st = 0; ... |
String | rtrim(String source) rtrim return source.replaceAll("\\s+$", ""); |
String | rtrim(String source) remove trailing whitespace return source.replaceAll("\\s+$", ""); |
String | rtrim(String src, char ch, int nLen) rtrim if (src == null || src.length() <= nLen) return src; char[] czSrc = src.toCharArray(); int i, j; int n = czSrc.length; for (i = n - 1; i >= nLen; i--) { if (czSrc[i] != ch) break; ... |
String | rtrim(String str) rtrim int i = str.length(); while (i > 0) { switch (str.charAt(i - 1)) { case ' ': case '\t': i--; continue; break; return str.substring(0, i); |
String | rtrim(String str) rtrim if (!hasLength(str)) { return str; StringBuilder sb = new StringBuilder(str); while (sb.length() > 0 && Character.isWhitespace(sb.charAt(sb.length() - 1))) { sb.deleteCharAt(sb.length() - 1); return sb.toString(); ... |
String | rtrim(String str) rtrim int start = str.length() - 1; for (int i = start; i >= 0; i--) { char c = str.charAt(i); if (c != ' ' && c != '\t') { return i != start ? str.substring(0, i + 1) : str; return ""; ... |
String | rtrim(String str) rtrim return rtrim(str, " "); |
String | rtrim(String str) rtrim int index = str.length(); while (' ' == str.charAt(--index)) ; if (index < str.length()) str = str.substring(0, index + 1); return str; |
String | rTrim(String str) r Trim return trimAt(str.length(), str);
|