Java Array Contain arrayContainsIgnoreCase(String[] array, String searchKey)

Here you can find the source of arrayContainsIgnoreCase(String[] array, String searchKey)

Description

array Contains Ignore Case

License

Open Source License

Declaration

public static final boolean arrayContainsIgnoreCase(String[] array, String searchKey) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static final boolean arrayContainsIgnoreCase(String[] array, String searchKey) {
        if (array == null)
            return false;

        for (String item : array) {
            if ((item == null && searchKey == null) || (item != null && item.equalsIgnoreCase(searchKey)))
                return true;
        }//w w w .j  a v  a 2s .  co  m

        return false;
    }
}

Related

  1. arrayContains(T[] src, T target)
  2. arrayContains(T[] ts, T t)
  3. arrayContains1(String[] parent, String[] child)
  4. arrayContainsElement(T[] array, T element)
  5. arrayContainsEntry(T[] array, T entry)
  6. arrayContainsIgnoreCase(String[] array, String str)
  7. arrayContainsInt(int[] array, int test)
  8. arrayContainsLower(String[] lemmas, String string)
  9. arrayContainsNumber(Number[] array, Number number)