-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_striteri.c
More file actions
40 lines (35 loc) · 1.23 KB
/
ft_striteri.c
File metadata and controls
40 lines (35 loc) · 1.23 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
33
34
35
36
37
38
39
40
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_striteri.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: thlibers <thlibers@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/10/17 12:28:35 by thlibers #+# #+# */
/* Updated: 2025/10/17 16:42:07 by thlibers ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_striteri(char *s, void (*f)(unsigned int, char *))
{
unsigned int i;
i = 0;
while (s[i])
{
f(i, &s[i]);
i++;
}
}
// void f(unsigned int n, char *c)
// {
// n = 0;
// if (*c >= 'a' && *c <= 'z')
// *c -= 32;
// }
// int main()
// {
// char s[] = "salut";
// ft_striteri(s, f);
// printf ("%s", s);
// return (0);
// }