26 lines
1.0 KiB
C
26 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_striteri.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/09/29 22:21:01 by cchauvet #+# #+# */
|
|
/* Updated: 2022/09/29 22:36:33 by cchauvet ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
void ft_striteri(char *s, void (*f)(unsigned int, char *))
|
|
{
|
|
size_t i;
|
|
|
|
i = 0;
|
|
while (s[i])
|
|
{
|
|
f(i, s + i);
|
|
i++;
|
|
}
|
|
}
|