List of utility methods to do String Tail
String | tail(final String text, final char ch) tail final int indx = text.lastIndexOf(ch); return (indx != -1) ? text.substring(indx + 1) : text; |
String | tail(final String text, final char ch) Return the string after the last occurance of the given character in the given string. final int indx = text.lastIndexOf(ch); return (indx != -1) ? text.substring(indx + 1) : text; |
String | tail(String s, char ch) Returns s.substring(s.lastIndexOf(ch) + 1). return s.substring(s.lastIndexOf(ch) + 1);
|
String | tail(String s, String separator) tail if (s == null) return null; int idx = s.lastIndexOf(separator); if (idx >= 0) return s.substring(idx + 1); else return s; |
String | tail(String src, String dividerRegex) tail String[] splitList = src.split(dividerRegex); if (splitList.length == 0) return src; else return splitList[splitList.length - 1]; |
String | tail(String text, String separator) gets the tail part of the given text after the given separator. int pos = text.lastIndexOf(separator); return pos != -1 ? text.substring(pos + 1) : text; |
String | tailOf(String s, char separator) tail Of int index = s.indexOf(separator); if (index < 0) return ""; return s.substring(index + 1); |
String | tailOfString(String input, String sub) Returns everything to the right of the specified string. String retString = null; if (input != null) { int lastIdx = input.indexOf(sub); if (lastIdx != -1) retString = input.substring(lastIdx + sub.length()); else retString = input; return retString; |