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_striter.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 libft/src/str/ft_striter.c (limited to 'libft/src/str/ft_striter.c') diff --git a/libft/src/str/ft_striter.c b/libft/src/str/ft_striter.c new file mode 100644 index 0000000..f410d24 --- /dev/null +++ b/libft/src/str/ft_striter.c @@ -0,0 +1,21 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_striter.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/10/07 10:38:16 by cacharle #+# #+# */ +/* Updated: 2019/11/20 02:01:32 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +void ft_striter(char *s, void (*f)(char *)) +{ + if (s == NULL || f == NULL) + return ; + while (*s) + (*f)(s++); +} -- cgit