diff --git a/ft_striteri.c b/ft_striteri.c new file mode 100644 index 0000000..faf4d2b --- /dev/null +++ b/ft_striteri.c @@ -0,0 +1,25 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_striteri.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: adjoly +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2023/11/11 14:15:30 by adjoly #+# #+# */ +/* Updated: 2023/11/11 15:08:03 by adjoly ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +void ft_striteri(char *s, void (*f)(unsigned int, char *)) +{ + int i; + + i = 0; + while (s[i]) + { + f(i, &s[i]); + i++; + } +}