The fact that C strings are presented in this format is totally irrelevant for the discussion of string search algorithms. They all have to know the length. Strings in most languages are not in that format, and it is an entirely reasonable assumption that the length is a known quantity.
If you wanna be annoying about this, just imagine he's implementing `strnstr` instead of `strstr`.