UJET interview question

Program a strstr type function, then upgrade it to an indexed search.