les, you are correct... somehow as it's thinked.

but, if you think of the string.
it start counting from 1
does the first char match.
with nothing everychar matches.
so. it gives the first occurance in string.
it is the current coding.

to fix it to zero in way that it checks first for char 0 which (obviously) is nothing.

but the returning value 0.
doesn't that inform that there is no string present in presence of another?

this is actually little bit tricky and even thou it isn't a bug, it might get newbies to not to use it.
but has it over the years?
it has been working for long time and like the way it is.
_________________________
!

download KiXnet