Here you can find the source of substringEL(String str, int index, String defaultValue)
public static String substringEL(String str, int index, String defaultValue)
//package com.java2s; //License from project: LGPL public class Main { public static String substringEL(String str, int index, String defaultValue) { if (str == null || index < 0 || index > str.length()) return defaultValue; return str.substring(index); }/*w w w . j a v a 2 s . co m*/ public static int length(String str) { if (str == null) return 0; return str.length(); } /** * this method works different from the regular substring method, the regular substring method takes startIndex and endIndex as second and third argument, * this method takes offset and length * @param str * @param off * @param len * @return */ public static String substring(String str, int off, int len) { return str.substring(off, off + len); } }