Files
42-libft/ft_striteri.c
David Gailleton 53b2050d11 calloc fix
2025-11-12 17:23:46 +01:00

26 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_striteri.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/11/08 17:36:38 by dgaillet #+# #+# */
/* Updated: 2025/11/12 17:21:21 by dgaillet ### ########lyon.fr */
/* */
/* ************************************************************************** */
void ft_striteri(char *s, void (*f)(unsigned int, char*))
{
unsigned int i;
if (!f)
return ;
i = 0;
while (s[i])
{
f(i, &s[i]);
i++;
}
}