fillit/libft/ft_striteri.c

24 lines
1 KiB
C
Raw Normal View History

2016-12-26 18:48:33 +02:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_striteri.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gtertysh <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/01 17:31:23 by gtertysh #+# #+# */
/* Updated: 2016/12/01 17:38:48 by gtertysh ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_striteri(char *s, void (*f)(unsigned int, char *))
{
unsigned int i;
i = 0;
if (s && f)
while (*s)
f(i++, s++);
}