stripos — Find position of first occurrence of a case-insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
How far have you got and where are you stuck? Do you understand the requirements? How do you think it might work (i.e. outline the basic algorithm). Do you know how to find a single char in a string? Since a string comprises multiple chars that might be a useful first step. Can you find an 's' in "haystack"? What about a 'u'? If you can find an 's', could you find "sta"? Could you find "sub"? For each question, why or why not?