ft_striter

This commit is contained in:
Tanguy MAZE
2018-04-07 11:32:08 +02:00
parent c1fa649a7f
commit 1cb14a826a
2 changed files with 25 additions and 2 deletions

22
ft_striter.c Normal file
View File

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