Here you can find the source of lastIndexOfAny(String str, String search, int offset)
public static int lastIndexOfAny(String str, String search, int offset)
//package com.java2s; public class Main { public static int lastIndexOfAny(String str, String search, int offset) { if (str.equals("") || search.equals("")) { return -1; }/*from w w w . j av a2 s . com*/ for (int i = str.length(), strCodepoint; i > 0; i -= Character.charCount(strCodepoint)) { strCodepoint = str.codePointBefore(i); for (int j = search.length(), searchCodepoint; j > 0; j -= Character.charCount(searchCodepoint)) { searchCodepoint = search.codePointBefore(j); if (strCodepoint == searchCodepoint) { return i; } } } return -1; } }