List of utility methods to do Array Last Index Of
int | lastIndexOfAny(String str, String[] searchStrs) Find the latest index of any of a set of potential substrings. if ((str == null) || (searchStrs == null)) { return -1; int sz = searchStrs.length; int ret = -1; int tmp = 0; for (int i = 0; i < sz; i++) { tmp = str.lastIndexOf(searchStrs[i]); ... |
int | lastIndexOfAny(String str, String[] searchStrs) last Index Of Any if ((str == null) || (searchStrs == null)) { return -1; int searchStrsLength = searchStrs.length; int index = -1; int tmp = 0; for (int i = 0; i < searchStrsLength; i++) { String search = searchStrs[i]; ... |
int | lastIndexOfAny(String str, String[] searchStrs) Find the latest index of any of a set of potential substrings. A if ((str == null) || (searchStrs == null)) { return -1; int sz = searchStrs.length; int ret = -1; int tmp = 0; for (int i = 0; i < sz; i++) { String search = searchStrs[i]; ... |
int | lastIndexOfAny(String string, char[] anyOf) last Index Of Any int highestIndex = -1; for (char c : anyOf) { int index = string.lastIndexOf(c); if (index > highestIndex) { highestIndex = index; if (index == string.length() - 1) break; return highestIndex; |
int | lastIndexOfAnyNoCheck(byte[] values, byte[] array, int index, int length) last Index Of Any No Check int j; for (int i = (index + length - 1); i >= index; i--) { byte b = array[i]; for (j = 0; j < values.length; j++) { if (b == values[j]) return i; return INVALID_INDEX; |
int | lastIndexOfArray(int r[], int rpos, int rend, char d[], int dpos) Get the offset of a last occurance of an int array within a char array. if (rend < rpos) throw new IllegalArgumentException("rend < rpos"); if (rend == rpos) return (d.length); if ((rend - rpos) == 1) { for (int x = d.length - 1; x > dpos; x--) if (r[rpos] == d[x]) return (x); ... |
int | lastIndexOfChars(String src, char[] chars, int startIndex, int endIndex) last Index Of Chars int total = src.length() - 1; if (total < 0) { return -1; if (startIndex >= total) { startIndex = total; if (endIndex < 0) { ... |
int | lastIndexOfInsensitive(String o, String[] vals) last Index Of Insensitive return lastIndexOfInsensitive(o, vals, 0);
|
int | lastIndexOfNoCheck(byte value, byte[] array, int index, int length) last Index Of No Check for (int i = (index + length - 1); i >= index; i--) { if (array[i] == value) return i; return INVALID_INDEX; |
int | lastIndexOfNot(byte[] array, int obj) last Index Of Not for (int i = array.length - 1; i >= 0; i--) { if (array[i] != obj) return i; return -1; |