#include <stdio.h>
char *ft_strstr(char *str, char *to_find)
{
int same = 0;
int i = 0;
while (*str)
{
while (*str == to_find[i])
{
i++;
if
}
str++;
}
return (0);
}
int main() {
char *string1 = "needle in a haystack dfwf";
char *string2 = "haystack";
ft_strstr(string1,string2);
printf(">>%s\n", ft_strstr(string1,string2));
}
To embed this program on your website, copy the following code and paste it into your website's HTML: