字符串方法

substr(start,length);

substring(start,end); (包括start,不包含end)   与 slice() 和 substr()  splice方法不同的是,substring() 不接受负的参数。

slice(start,end);   如果是负数,那么它规定从数组尾部开始算起的位置。也就是说,-1 指最后一个元素,-2 指倒数第二个元素,以此类推。

splice(start,length);

原文地址:https://www.cnblogs.com/sunmarvell/p/14056692.html