/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strstr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: gbaconni +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/08/12 16:49:31 by gbaconni #+# #+# */ /* Updated: 2021/08/12 17:11:14 by gbaconni ### ########.fr */ /* */ /* ************************************************************************** */ #include char *ft_strstr(char *str, char *to_find) { unsigned int i; unsigned int j; i = 0; while (str[i] != '\0') { j = 0; while (str[i + j] != '\0' && str[i + j] == to_find[j]) j++; if (to_find[j] == '\0') return (str + i); i++; } return (NULL); }