nginx-tutorials icon indicating copy to clipboard operation
nginx-tutorials copied to clipboard

string模块string.find关于init值为负数是描述问题

Open ghost opened this issue 5 years ago • 0 comments

string的index是从1开始的,因此index为-1,实际的正index应为string.len(s),而不是string.len(s)+init (string.len(s)+(-1)) 应该写成string.len(s)+init+1

ghost avatar Dec 17 '18 05:12 ghost