Prefer String#lastIndexOf(String, int) over less efficient alternatives

Apache 2.0

Warning: when str2 is empty, this rewrite changes the result: the original expression returns fromIndex, while the replacement returns fromIndex - 1.

tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringLastIndexOfMinusOneStringRecipe
mod run . --recipe='tech.picnic.errorprone.refasterrules.StringRulesRecipes$StringLastIndexOfMinusOneStringRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.