Java Array Starts With startsWith(byte[] nameRaw, byte[] namePrefix)

Here you can find the source of startsWith(byte[] nameRaw, byte[] namePrefix)

Description

starts With

License

Mozilla Public License

Declaration

private static boolean startsWith(byte[] nameRaw, byte[] namePrefix) 

Method Source Code

//package com.java2s;
//License from project: Mozilla Public License 

public class Main {
    private static boolean startsWith(byte[] nameRaw, byte[] namePrefix) {
        for (int i = 0; i < namePrefix.length; i++) {
            if (namePrefix[i] != nameRaw[i])
                return false;
        }/*from  w ww. j  a va 2  s. c o m*/

        return true;
    }
}

Related

  1. startsWith(byte[] bytes, int offset, byte... prefix)
  2. startsWith(byte[] bytes, String str, int offset)
  3. startsWith(byte[] bytes, String text)
  4. startsWith(byte[] checkMe, byte[] maybePrefix)
  5. startsWith(byte[] haystack, byte[] needle)
  6. startsWith(byte[] p, byte id)
  7. startsWith(byte[] prefix, byte[] source)
  8. startsWith(byte[] source, byte[] match)
  9. startsWith(byte[] source, byte[] match)