c#
String.SubString(int index,int length)
String.SubString(int start)
等效于
javascript
stringObject.substr(start,length)
stringObject.substr(start)
java
* @param beginIndex the beginning index, inclusive.* @param endIndex the ending index, exclusive.
public String substring(int beginIndex, int endIndex)
与上面相对应的实现
public static String subString(String src, int startIndex, int length){
return src.substring(startIndex, startIndex+length);
}
------------------------------------------------------------------------------------------
javascript
stringObject.substring(start,stop)