Here you can find the source of subString(String source, String start, int offsetStart, String end, int offsetEnd)
public static String subString(String source, String start, int offsetStart, String end, int offsetEnd)
//package com.java2s; public class Main { /****************************** Substring ******************************/ //from ww w . j a v a 2 s. c om public static String subString(String source, String start, int offsetStart, String end, int offsetEnd) { return source.substring(source.indexOf(start) + offsetStart, source.indexOf(offsetEnd) + offsetEnd); } }