Here you can find the source of getSecondToLastIndexOf(String string, char character)
public static int getSecondToLastIndexOf(String string, char character)
//package com.java2s; //License from project: LGPL public class Main { public static int getSecondToLastIndexOf(String string, char character) { String temp = string.substring(0, string.lastIndexOf(character)); return temp.lastIndexOf(character); }//from www . j a v a2 s . c om }