Here you can find the source of substringAfterLast(String input, String delimiter)
public static String substringAfterLast(String input, String delimiter)
//package com.java2s; //License from project: LGPL public class Main { public static String substringAfterLast(String input, String delimiter) { final int lastIndexOfDelimiter = input.lastIndexOf(delimiter); if (lastIndexOfDelimiter <= 0) return input; return input.substring(lastIndexOfDelimiter + 1); }// w w w . ja v a 2 s.c om }