(last)indexOfAny(index)

whitespace

some code reductions