-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_striteri.c
More file actions
26 lines (24 loc) · 1.04 KB
/
ft_striteri.c
File metadata and controls
26 lines (24 loc) · 1.04 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
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_striteri.c :+: :+: */
/* +:+ */
/* By: mgraaf <mgraaf@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2021/12/16 14:24:06 by mgraaf #+# #+# */
/* Updated: 2021/12/16 14:24:09 by mgraaf ######## odam.nl */
/* */
/* ************************************************************************** */
void ft_striteri(char *s, void (*f)(unsigned int, char*))
{
int i;
i = 0;
if ((!s || !f) || (!s && !f))
return ;
while (s[i])
{
f(i, &s[i]);
i++;
}
s[i] = '\0';
}