Amazon interview question

Write a function to find a substring in a string.