static int smartIndexOfStartsWith(L l, S s) { ret smartIndexOfStartsWith(l, s, 0); } static int smartIndexOfStartsWith(L l, S s, int i) { int idx = indexOfStartsWith(l, s); ret idx < 0 ? l(l) : idx; }