List of utility methods to do String Last Index Of
int | lastIndexOf(final CharSequence cs, final int searchChar, int start) Returns the index within cs of the last occurrence of the specified character, searching backward starting at the specified index.
if (cs instanceof String) { return ((String) cs).lastIndexOf(searchChar, start); final int sz = cs.length(); if (start < 0) { return NOT_FOUND; if (start >= sz) { ... |
int | lastIndexOf(final String input, final char delim) Gets the last index of a character ignoring characters that have been escaped return input == null ? -1 : lastIndexOf(input, delim, input.length());
|
int | lastIndexOf(final String src, final String sub, int startIndex, int endIndex) last Index Of final int sublen = sub.length(); final int srclen = src.length(); if (sublen == 0) { return (startIndex > srclen) ? srclen : ((startIndex < -1) ? -1 : startIndex); final int total = srclen - sublen; if (total < 0) { return -1; ... |
int | lastIndexOf(String baseString, String indexString) last Index Of if (baseString == null) return -1; else return baseString.lastIndexOf(indexString); |
int | lastIndexOf(String input, char ch, int offset) Like a String.lastIndexOf but without MIN_SUPPLEMENTARY_CODE_POINT handling for (int i = input.length() - 1 - offset; i >= 0; i--) { if (input.charAt(i) == ch) { return i; return -1; |
int | lastIndexOf(String path, char ch) last Index Of if (path == null) { return -1; return path.lastIndexOf(ch); |
int | lastIndexOf(String s, String sub, int startIndex, int endIndex) Finds last index of a substring in the given source string in specified range [end, start] See #indexOf(String,String,int,int) for details about the speed. int sublen = sub.length(); int srclen = s.length(); if (sublen == 0) { return startIndex > srclen ? srclen : (startIndex < -1 ? -1 : startIndex); int total = srclen - sublen; if (total < 0) { return -1; ... |
Integer | lastIndexOf(String self, String pattern, Integer start) last Index Of return self.lastIndexOf(pattern, start);
|
int | lastIndexOf(String str, char searchChar) last Index Of if ((str == null) || (str.length() == 0)) { return -1; return str.lastIndexOf(searchChar); |
int | lastIndexOf(String str, char searchChar) Finds the last index within a String, handling if (isEmpty(str)) { return -1; return str.lastIndexOf(searchChar); |