// works on lists and strings and null static int indexOfIgnoreCase(L a, S b) { int n = l(a); for i to n: if (eqic(a.get(i), b)) ret i; ret -1; } static int indexOfIgnoreCase(S a, S b) { Matcher m = Pattern.compile(b, Pattern.CASE_INSENSITIVE + Pattern.LITERAL).matcher(a); if (m.find()) return m.start(); else ret -1; }