From c98de126d2252fe47dc2a9094a5f9a8fa6b4b60a Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 11 Oct 2020 15:52:52 +0200 Subject: Removing libft/minishell_test submodules, Removing subject/README/etc --- libft/src/str/ft_strpbrk.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 libft/src/str/ft_strpbrk.c (limited to 'libft/src/str/ft_strpbrk.c') diff --git a/libft/src/str/ft_strpbrk.c b/libft/src/str/ft_strpbrk.c new file mode 100644 index 0000000..753e4d9 --- /dev/null +++ b/libft/src/str/ft_strpbrk.c @@ -0,0 +1,24 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strpbrk.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/10 04:39:29 by cacharle #+# #+# */ +/* Updated: 2020/02/10 04:54:13 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft_str.h" + +char *ft_strpbrk(const char *s, const char *charset) +{ + if (s == NULL || charset == NULL) + return (NULL); + while (*s && ft_strchr(charset, *s) == NULL) + s++; + if (*s == '\0') + return (NULL); + return ((char*)s); +} -- cgit