Java Array Search memchr(boolean[] ary, int start, int len, boolean find)

Here you can find the source of memchr(boolean[] ary, int start, int len, boolean find)

Description

memchr

License

LGPL

Declaration

public static int memchr(boolean[] ary, int start, int len, boolean find) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    public static int memchr(boolean[] ary, int start, int len, boolean find) {
        for (int i = 0; i < len; i++) {
            if (ary[i + start] == find)
                return i + start;
        }/*from w  w w  . j  a v  a  2  s . c  o m*/
        return -1;
    }
}

Related

  1. isIn(char to_find, char[] to_search)
  2. isIn(String name, String[] array)
  3. isIn(String name, String[] array)
  4. isInArray(final T ch, final T[] a)
  5. isInArray(String needle, String[] haystack)
  6. memchr(char[] haystack, int offset, char needle, int num)
  7. memchr(T[] ptr, T value)
  8. replaceAll(String text, char[] toSearch, char toReplace)
  9. search(double[] input, int[] bounds, double x)