/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: gbaconni +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/08/12 16:49:41 by gbaconni #+# #+# */ /* Updated: 2021/08/12 17:07:20 by gbaconni ### ########.fr */ /* */ /* ************************************************************************** */ #include #include #include #include char *ft_strstr(char *str, char *to_find); int main(void) { char str[32]; char to_find[32]; char *r; printf("Input String #1 [max 31]: "); scanf("%s", str); printf("Input String #2 [max 31]: "); scanf("%s", to_find); r = ft_strstr(str, to_find); printf("str=%s to_find=%s result=%s (ft_strstr)\n", str, to_find, r); r = strstr(str, to_find); printf("str=%s to_find=%s result=%s (strstr)\n", str, to_find, r); return (0); }