Here you can find the source of arrayContains(String[] arr, String sg, boolean ignoreCase)
public static boolean arrayContains(String[] arr, String sg, boolean ignoreCase)
//package com.java2s; public class Main { public static boolean arrayContains(String[] arr, String sg, boolean ignoreCase) { for (int i = 0; i < arr.length; i++) { if (ignoreCase) { if (sg.equalsIgnoreCase(arr[i])) return true; } else { if (sg.equals(arr[i])) return true; }// w w w.j a v a2s . c o m } return false; } }