substr 是截取字符串函数 substr(string,start,length)
h e l l o 对应的针分别为
0 1 2 3 4
-4 -3 -2 -1 0
substr('hello',1,-2); start 是1 所以是从 e 开始截取长度为-2 。是截止到从后面开始数 对应-2 的字母结束 所以是 el
我的博客http://zencart.me
substr 是截取字符串函数 substr(string,start,length)
h e l l o 对应的针分别为
0 1 2 3 4
-4 -3 -2 -1 0
substr('hello',1,-2); start 是1 所以是从 e 开始截取长度为-2 。是截止到从后面开始数 对应-2 的字母结束 所以是 el
我的博客http://zencart.me
转载于:https://my.oschina.net/u/915813/blog/111553