Here you can find the source of substring(String src, int beginIndex, int endIndex)
public static String substring(String src, int beginIndex, int endIndex)
//package com.java2s; public class Main { public static String substring(String src, int beginIndex, int endIndex) { if (src.length() < beginIndex) return ""; return src.substring(beginIndex, endIndex); }/*from www . j a v a 2 s . c om*/ public static String substring(String src, int beginIndex) { if (src.length() < beginIndex) return ""; return src.substring(beginIndex); } public static int length(String s) { if (s == null || s.length() == 0) return 0; return s.length(); } }