Here you can find the source of lastIndexOf(String text, int startPos, String... searchStrings)
public static int lastIndexOf(String text, int startPos, String... searchStrings)
//package com.java2s; //License from project: Apache License public class Main { public static int lastIndexOf(String text, int startPos, String... searchStrings) { int bestPos = -1; for (String i : searchStrings) { int pos = text.lastIndexOf(i, startPos); if (pos >= 0) { if ((bestPos < 0) || (pos > bestPos)) { bestPos = pos;//from ww w . j a va 2s. c o m } } } return bestPos; } }