Amazon Interview Question

Write a function to find a substring in a string.