26 lines
1.0 KiB
C
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 13:32:30 by dgaillet ### ########lyon.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++;
|
|
}
|
|
}
|