Here you can find the source of cutStringFromChar(String str1, String str2, int offset)
public static String cutStringFromChar(String str1, String str2, int offset)
//package com.java2s; public class Main { public static String cutStringFromChar(String str1, String str2, int offset) { if (isEmpty(str1)) { return ""; }//from w ww . j av a2 s.c om int start = str1.indexOf(str2); if (start != -1) { if (str1.length() > start + offset) { return str1.substring(start + offset); } } return ""; } public static boolean isEmpty(String str) { return str == null || str.trim().length() == 0; } }