Here you can find the source of substring(String str, int off, int len)
Parameter | Description |
---|---|
str | a parameter |
off | a parameter |
len | a parameter |
public static String substring(String str, int off, int len)
//package com.java2s; //License from project: LGPL public class Main { /**//from w w w . j a v a 2 s . c o m * 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); } }