libft_old/extended_libft/ft_striteri.c
Willem Haffmans 326f52308e all
2024-07-26 22:32:04 +02:00

28 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_striteri.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: whaffman <whaffman@student.codam.nl> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/05 18:42:09 by whaffman #+# #+# */
/* Updated: 2024/07/10 16:07:16 by whaffman ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_striteri(char *s, void (*f)(unsigned int, char*))
{
unsigned int i;
i = 0;
if (!s)
return ;
while (s[i])
{
f(i, &s[i]);
i++;
}
}