Here you can find the source of substringAfter(String text, String after)
public static String substringAfter(String text, String after)
//package com.java2s; // Metawidget (licensed under LGPL) public class Main { /**/*w w w. ja va 2 s. co m*/ * Returns the portion of the overall string that comes after the first occurance of the given * string. If the given string is not found in the overall string, returns the entire string. */ public static String substringAfter(String text, String after) { int indexOf = text.indexOf(after); if (indexOf == -1) { return text; } return text.substring(indexOf + after.length()); } }