-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_striteri.c
More file actions
32 lines (29 loc) · 1.09 KB
/
ft_striteri.c
File metadata and controls
32 lines (29 loc) · 1.09 KB
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
32
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_striteri.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mattig <mattig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/28 10:29:26 by mattig #+# #+# */
/* Updated: 2021/11/04 18:51:28 by mattig ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_striteri(char *s, void (*f)(unsigned int, char*))
{
int i;
int j;
i = 0;
j = 0;
if (s != NULL && f != NULL)
{
i = ft_strlen(s);
while (j < i)
{
(*f)(j, s);
s++;
j++;
}
}
}