Java Array Has inArray(String[] haystack, String needle)

Here you can find the source of inArray(String[] haystack, String needle)

Description

in Array

License

Creative Commons License

Declaration

protected static boolean inArray(String[] haystack, String needle) 

Method Source Code

//package com.java2s;
//License from project: Creative Commons License 

public class Main {
    protected static boolean inArray(String[] haystack, String needle) {
        for (int i = 0; i < haystack.length; i++) {
            if (haystack[i].toLowerCase().equals(needle.toLowerCase())) {
                return true;
            }//  www . ja v  a  2 s .  c om
        }
        return false;
    }
}

Related

  1. inArray(String string, String[] strings)
  2. inArray(String value, String[] s)
  3. inArray(String value, String[] values)
  4. inArray(String[] attributes, String attribute)
  5. inArray(String[] delegableOperations, String operationId)
  6. inArray(T el, T[] array)
  7. inArray(T needle, T[] hayshack)
  8. inArray(T[] array, T element)