/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strstr.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/08/07 10:48:35 by jhalford #+# #+# */ /* Updated: 2016/08/09 13:53:17 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ char *ft_strstr(char *str, char *to_find) { int i; int j; i = 0; while (str[i] != '\0') { j = 0; while (str[i + j] == to_find[j]) { j++; if (to_find[j] == '\0') return (str + i); } i++; } return (0); }