diff options
Diffstat (limited to 'src/str/ft_striter.c')
| -rw-r--r-- | src/str/ft_striter.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/str/ft_striter.c b/src/str/ft_striter.c new file mode 100644 index 0000000..f410d24 --- /dev/null +++ b/src/str/ft_striter.c @@ -0,0 +1,21 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_striter.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* 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++); +} |
