aboutsummaryrefslogtreecommitdiff
path: root/libft/src/str/ft_striter.c
diff options
context:
space:
mode:
Diffstat (limited to 'libft/src/str/ft_striter.c')
-rw-r--r--libft/src/str/ft_striter.c21
1 files changed, 21 insertions, 0 deletions
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 <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++);
+}