Libraryless. Click here for Pure Java version (130L/1K).
// works on lists and strings and null static int indexOfIgnoreCase(L<S> a, S b) { ret indexOfIgnoreCase(a, b, 0); } static int indexOfIgnoreCase(L<S> a, S b, int i) { int n = a == null ? 0 : a.size(); for (; i < n; i++) if (eqic(a.get(i), b)) ret i; ret -1; } static int indexOfIgnoreCase(S[] a, S b, int i default 0) { int n = a == null ? 0 : a.length; for (; i < n; i++) if (eqic(a[i], b)) ret i; ret -1; } static int indexOfIgnoreCase(S a, S b) { ret indexOfIgnoreCase_manual(a, b); /*Matcher m = Pattern.compile(b, Pattern.CASE_INSENSITIVE + Pattern.LITERAL).matcher(a); if (m.find()) return m.start(); else ret -1;*/ } static int indexOfIgnoreCase(S a, S b, int i) { ret indexOfIgnoreCase_manual(a, b, i); }
download show line numbers debug dex old transpilations
Travelled to 18 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, lnbujpyubztb, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv
No comments. add comment