Here you can find the source of containsIgnoreCase(String str, String... list)
public static final boolean containsIgnoreCase(String str, String... list)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; public class Main { public static final boolean containsIgnoreCase(String str, String... list) { if (list != null && list.length != 0) { for (String s : Arrays.asList(list)) { if (s != null && s.equalsIgnoreCase(str)) { return true; }/*w ww.j a va 2s. com*/ } } return false; } public static final boolean containsIgnoreCase(ArrayList<String> list, String str) { if (list != null && !list.isEmpty()) { for (String s : new ArrayList<>(list)) { if (s != null && s.equalsIgnoreCase(str)) { return true; } } } return false; } public static boolean containsIgnoreCase(Collection<String> list, String str) { if (list != null && !list.isEmpty()) { for (String s : new ArrayList<>(list)) { if (s != null && s.equalsIgnoreCase(str)) { return true; } } } return false; } }