This commit is contained in:
Jeremy FLEURY
2019-07-17 11:22:24 +02:00
commit 748d10f4f3
174 changed files with 8953 additions and 0 deletions

29
libft/libft/ft_striteri.c Normal file
View File

@@ -0,0 +1,29 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_striteri.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jfleury <jfleury@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/13 10:00:37 by jfleury #+# #+# */
/* Updated: 2018/11/15 17:26:01 by jfleury ### ########.fr */
/* */
/* ************************************************************************** */
#include <string.h>
void ft_striteri(char *s, void (*f)(unsigned int, char*))
{
unsigned int i;
i = 0;
if (s != NULL && f != NULL)
{
while (*s != '\0')
{
f(i, s);
i++;
s++;
}
}
}