libft
Loading...
Searching...
No Matches
ft_striteri.c
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ft_striteri.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: tspoof <tspoof@student.hive.fi> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2022/11/05 23:53:15 by tspoof #+# #+# */
9/* Updated: 2022/11/07 18:57:17 by tspoof ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#include "libft.h"
14
15void ft_striteri(char *s, void (*f)(unsigned int, char*))
16{
17 int i;
18
19 if (!s || !f)
20 return ;
21 i = 0;
22 while (s[i])
23 {
24 f(i, &s[i]);
25 i++;
26 }
27}
void ft_striteri(char *s, void(*f)(unsigned int, char *))
Calls a function for each char of a string.
Definition ft_striteri.c:15
float f
Definition unity.c:1777