-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_striteri.c
31 lines (28 loc) · 1.08 KB
/
ft_striteri.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
28
29
30
31
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_striter.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: bsiguret <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/11/08 23:42:17 by bsiguret #+# #+# */
/* Updated: 2017/11/09 06:20:08 by bsiguret ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_striteri(char *s, void (*f)(unsigned int, char *))
{
int i;
int j;
if (s != NULL && f != NULL)
{
i = ft_strlen(s);
j = 0;
while (j < i)
{
f(j, s);
j++;
s++;
}
}
}