minishell
ft_striteri.c
Go to the documentation of this file.
1 /* ************************************************************************** */
2 /* */
3 /* ::: :::::::: */
4 /* ft_striteri.c :+: :+: :+: */
5 /* +:+ +:+ +:+ */
6 /* By: kfujita <kfujita@student.42tokyo.jp> +#+ +:+ +#+ */
7 /* +#+#+#+#+#+ +#+ */
8 /* Created: 2022/04/19 07:54:31 by kfujita #+# #+# */
9 /* Updated: 2022/04/25 23:28:31 by kfujita ### ########.fr */
10 /* */
11 /* ************************************************************************** */
12 
13 #include <stddef.h>
14 #include "ft_string.h"
15 
16 void ft_striteri(char *s, void (*f)(unsigned int, char *))
17 {
18  size_t index;
19 
20  if (s == NULL || f == NULL)
21  return ;
22  index = 0;
23  while (*s != '\0')
24  f(index++, s++);
25 }
void ft_striteri(char *s, void(*f)(unsigned int, char *))
Definition: ft_striteri.c:16