Java Array Contain ArrayContains(String[][] arr, String s)

Here you can find the source of ArrayContains(String[][] arr, String s)

Description

Array Contains

License

Open Source License

Parameter

Parameter Description
arr a parameter
s a parameter

Declaration

public static boolean ArrayContains(String[][] arr, String s) 

Method Source Code

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

public class Main {
    /**//from  w  w  w  . java  2  s  .c o  m
     * 
     * @param arr
     * @param s
     * @return
     */
    public static boolean ArrayContains(String[][] arr, String s) {
        s = s.toLowerCase().trim();
        for (int i = 0; i < arr.length; i++)
            for (int j = 0; j < arr[i].length; j++)
                if (arr[i][j].toLowerCase().trim().equals(s))
                    return true;
        return false;
    }
}

Related

  1. arrayContains(String[] array, String value)
  2. arrayContains(String[] array, String value)
  3. arrayContains(String[] array, String word)
  4. arrayContains(String[] parent, String[] child)
  5. arrayContains(String[] pArray, String pItem)
  6. arrayContains(T haystack[], T needle)
  7. arrayContains(T search, T[] array, boolean def)
  8. arrayContains(T[] arr, T item)
  9. arrayContains(T[] array, T value)