Here you can find the source of subString(String val, int start, int end)
public static String subString(String val, int start, int end)
//package com.java2s; //License from project: Open Source License public class Main { public static String subString(String val, int start, int end) { if (!isEmpty(val) && val.length() >= end) { return val.substring(start, end); }//w ww.j av a2 s . c om return val; } public static boolean isEmpty(String val) { return val == null || val.trim().length() == 0; } }