28 lines
1.1 KiB
C
28 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_striteri.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: aortigos <aortigos@student.42malaga.com> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/10/22 19:10:23 by aortigos #+# #+# */
|
|
/* Updated: 2023/10/22 19:13:30 by aortigos ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
void ft_striteri(char *s, void (*f)(unsigned int, char *))
|
|
{
|
|
unsigned int i;
|
|
|
|
if (!s || !(*s) || !f)
|
|
return ;
|
|
i = 0;
|
|
while (s[i])
|
|
{
|
|
f(i, &s[i]);
|
|
i++;
|
|
}
|
|
}
|