libft
src
ft_striteri.c
Go to the documentation of this file.
1
/* ************************************************************************** */
3
/* */
4
/* ::: :::::::: */
5
/* ft_striteri.c :+: :+: :+: */
6
/* +:+ +:+ +:+ */
7
/* By: unite <marvin@42.fr> +#+ +:+ +#+ */
8
/* +#+#+#+#+#+ +#+ */
9
/* Created: 2019/09/05 00:41:57 by unite #+# #+# */
10
/* Updated: 2020/07/16 02:45:53 by unite ### ########.fr */
11
/* */
12
/* ************************************************************************** */
13
14
#include "
libft.h
"
15
25
void
ft_striteri
(
char
*s,
void
(*f)(
unsigned
int
,
char
*))
26
{
27
size_t
i;
28
29
if
(!s || !f)
30
return ;
31
i = 0;
32
while
(*s)
33
f(i++, s++);
34
}
ft_striteri
void ft_striteri(char *s, void(*f)(unsigned int, char *))
Applies a function to characters of a string and their indices.
Definition:
ft_striteri.c:25
libft.h
Generated by
1.8.16