libft/ft_striteri.c
2023-12-12 17:30:46 +01:00

26 lines
1.0 KiB
C
Executable File

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_striteri.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/16 14:25:00 by fgras-ca #+# #+# */
/* Updated: 2023/11/14 17:08:02 by fgras-ca ### ########.fr */
/* */
/* ************************************************************************** */
void ft_striteri(char *s, void (*f)(unsigned int, char*))
{
unsigned int i;
if (!s)
return ;
i = 0;
while (s[i])
{
f(i, &s[i]);
i++;
}
}