List of utility methods to do Array Start With
boolean | arrayStartsWith(byte[] a, byte[] b) array Starts With return rangeEquals(a, 0, b, 0, b.length);
|
boolean | arrayStartsWith(byte[] array, byte[] target) Checks if array starts with target. if (array == null) { return false; if (target == null) { return true; if (target.length > array.length) { return false; ... |
boolean | arrayStartsWith(final byte[] array, final byte[] str) Check that a byte array starts with some byte values. boolean result = false; if (array.length >= str.length) { result = true; int index = str.length; while (--index >= 0) { if (array[index] != str[index]) { result = false; break; ... |
boolean | arrayStartsWith(V[] pattern, V[] data) array Starts With for (int i = 0; i < pattern.length; i++) { if (data[i] != pattern[i]) { return false; return true; |
boolean | startWith(byte[] data, int start, byte[] find) start With if (data.length - start < find.length) { return false; for (int i = 0; i < find.length; i++) { if (data[start + i] != find[i]) { return false; return true; |
boolean | startWith(byte[] startWith, byte[] bytes) start With if (bytes == null || startWith == null || bytes.length < startWith.length) { return false; for (int i = 0; i < startWith.length; i++) { if (bytes[i] != startWith[i]) { return false; return true; |
int | startWith(char[] value, char c) start With for (int i = 0; i < value.length; i++) { if (Character.isSpaceChar(value[i]) || Character.isWhitespace(value[i])) continue; else if (c == value[i]) return i; else return -1; return -1; |
boolean | startWith(final byte[] aBuffer, final byte[] aPrefix) start With if (aBuffer == null || aPrefix == null || aBuffer.length < aPrefix.length) { return false; int wMax = aPrefix.length; int wI = 0; while (wI < wMax) { if (aBuffer[wI] != aPrefix[wI]) { return false; ... |
boolean | startWith(String t, String[] prefix) start With for (String p : prefix) { if (t.startsWith(p)) { return true; return false; |