Why is it stated that the position of the first character of matching text starts from 0, while the position of the text string starts from one? Isn’t it contradictory? -PHP Chinese website Q&A-Why is it stated that the position of the first character of matching text starts from 0, but the text string starts from the beginning? Isn't it contradictory? -PHP Chinese website Q&A
Why is it stated that the position of the first character of matching text starts from 0, while the position of the text string starts from one? Isn’t it contradictory? -PHP Chinese website Q&A-Why is it stated that the position of the first character of matching text starts from 0, but the text string starts from the beginning? Isn't it contradictory? -PHP Chinese website Q&A
Please watch and learn.
位置0是在第一个字符的前面,0之前没有字符,位置1前面的就是第一个字符