Libft
42 Libft library documentation
Loading...
Searching...
No Matches
ft_striteri.c
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ft_striteri.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: raphalme <raphalme@student.42.fr> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/12/29 19:08:00 by raphalme #+# #+# */
9/* Updated: 2026/04/14 10:45:22 by raphalme ### ########.fr */
10/* */
11/* ************************************************************************** */
12
21void ft_striteri(char *s, void (*f)(unsigned int, char*))
22{
23 unsigned int i;
24
25 if (!s || !f)
26 return ;
27 i = 0;
28 while (s[i])
29 {
30 f(i, &s[i]);
31 i++;
32 }
33}
void ft_striteri(char *s, void(*f)(unsigned int, char *))
Applies a callback to each character of a string in place.
Definition ft_striteri.c:21