-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_striter.c
27 lines (24 loc) · 1.02 KB
/
ft_striter.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_striter.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nhennigh <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/12 17:15:57 by nhennigh #+# #+# */
/* Updated: 2019/02/15 18:12:45 by nhennigh ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_striter(char *s, void (*f)(char *))
{
int i;
if (s && f)
{
i = -1;
while (*(s + ++i))
{
(*f)(s + i);
}
}
}