ft_striteri, ft_striter: changed int to unsigned int

This commit is contained in:
Tanguy MAZE
2018-04-07 11:52:54 +02:00
parent 1cb14a826a
commit a3462b7b10
3 changed files with 27 additions and 4 deletions

22
ft_striteri.c Normal file
View File

@@ -0,0 +1,22 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_striteri.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmaze <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/04/07 11:36:12 by tmaze #+# #+# */
/* Updated: 2018/04/07 11:48:32 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_striteri(char *s, void (*f)(unsigned int, char*))
{
unsigned int i;
i = -1;
while (s[++i])
(*f)(i, &s[i]);
}