Here you can find the source of substring(String src, int start_idx, int end_idx)
private static String substring(String src, int start_idx, int end_idx)
//package com.java2s; public class Main { private static String substring(String src, int start_idx, int end_idx) { byte[] b = src.getBytes(); String tgt = ""; for (int i = start_idx; i <= end_idx; i++) { tgt += (char) b[i]; }/*from w w w . ja v a 2 s .c o m*/ return tgt; } }