Here you can find the source of subString(String input, char start, char end)
public static String subString(String input, char start, char end)
//package com.java2s; public class Main { public static String subString(String input, char start, char end) { int intStart = input.indexOf(String.valueOf(start)); if (intStart < 0) { return input; }//from ww w . jav a2 s . c o m intStart++; String ret = input.substring(intStart); int intEnd = ret.indexOf(String.valueOf(end)); if (intEnd < 0) { return input; } return ret.substring(0, intEnd); } public static int indexOf(String target, String[] source) { int loop = 0; int index = 0; try { index = -1; for (String value : source) { if (target.equals(value)) { index = loop; break; } loop++; } return index; } finally { } } }