用法:
strVariable.substring(start, end)
stringvar.substr(start [, length ])
第一种方法的参数有点不太好理解,MSDN上有这么一句:
The length of the substring is equal to the absolute value of the difference between start and end.
那么这个end的含义应该是start+length
用法:
strVariable.substring(start, end)
stringvar.substr(start [, length ])
第一种方法的参数有点不太好理解,MSDN上有这么一句:
The length of the substring is equal to the absolute value of the difference between start and end.
那么这个end的含义应该是start+length