wip_parsing
This commit is contained in:
27
libft/str/ft_striteri.c
Normal file
27
libft/str/ft_striteri.c
Normal file
@ -0,0 +1,27 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_striteri.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: madumerg <madumerg@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/06 11:34:05 by madumerg #+# #+# */
|
||||
/* Updated: 2023/11/07 18:13:31 by madumerg ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
void ft_striteri(char *s, void (*f)(unsigned int, char*))
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
i = 0;
|
||||
if (!s || !f)
|
||||
return ;
|
||||
while (s[i])
|
||||
{
|
||||
f(i, &s[i]);
|
||||
i++;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user