if (search.length == 0) { return -1; int found = 0; loop: while (true) { found = binarySearch(array, search[0], found + 1); if (found < 0 || found > array.length) { return -1; ...
for (int j = 0; j < arr.length; j++) { if (arr[j] == i) return j; return -1;
for (int i = 0; i <= data.length - searchData.length; i++) { if (data[i] == searchData[0] && Arrays.equals(searchData, extractBytes(data, i, searchData.length))) return i; return -1;
byte[] copy = new byte[array.length]; System.arraycopy(array, 0, copy, 0, array.length); Arrays.sort(copy); return Arrays.binarySearch(copy, toSearch) >= 0;
Get the (first) index at which a char exists in a char-array.
if (to_search == null) { throw new NullPointerException("to_search"); if (do_orderAsc) { return Arrays.binarySearch(to_search, to_find); for (int i = 0; i < to_search.length; i++) { if (to_find == to_search[i]) { ...
int index = -1; if (array != null) { int i = 0; while (i < array.length && index < 0) { if (array[i] != null ? array[i].equals(toSearch) : toSearch == null) { index = i; i++; ...
Is the char in the char-array?.
return (getFoundIdx(to_find, to_search) > -1);
if (array == null || name == null) return false; return Arrays.binarySearch(array, name) >= 0;
if (array == null || name == null) return false; return Arrays.binarySearch(array, name) >= 0;
return Arrays.stream(a).anyMatch(item -> ch.equals(item));