summaryrefslogtreecommitdiff
path: root/ft_striteri.c
diff options
context:
space:
mode:
Diffstat (limited to 'ft_striteri.c')
-rw-r--r--ft_striteri.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/ft_striteri.c b/ft_striteri.c
new file mode 100644
index 0000000..e7c8b89
--- /dev/null
+++ b/ft_striteri.c
@@ -0,0 +1,25 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_striteri.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2024/03/10 11:24:32 by dkaiser #+# #+# */
+/* Updated: 2024/03/10 13:19:39 by dkaiser ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "libft.h"
+
+void ft_striteri(char *s, void (*f)(unsigned int, char *))
+{
+ unsigned int i;
+
+ i = 0;
+ while (s[i])
+ {
+ f(i, &s[i]);
+ i++;
+ }
+}