is substring of string
Check if string 2 is a substring of string 1. If so return position of start string
ex: " a b c d e" , " c d e" returns 2
Solution: iterative check
Check for first char of string 2
if found, check string 2. length amount of chars
if all chars match, return position
Last updated
Was this helpful?