Hint: what is the correct behaviour of this method when given empty strings? Every string contains the empty string as a substring.
There's also no null handling here, which was a deliberate omission for clarity. In practice, the convention used inside the VB source code is that null string pointers are semantically the same as empty strings, which introduces some complexities.