hey guys, i have a question about writing a function where the user is prompted to input 2 strings, and "determine if the second is in the first."
anybody have any ideas how one would go about doing this?
hey guys, i have a question about writing a function where the user is prompted to input 2 strings, and "determine if the second is in the first."
anybody have any ideas how one would go about doing this?
It's actually a standard function from string.h header.
char *strstr(const char * s1, const char * s2);
This function returns a pointer to the first occurrence of string s2 in string s1. The function returns the null pointer if the string is not found.