UtilLib
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_striteri.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: hexplor <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/23 12:50:39 by hexplor #+# #+# */
|
||||
/* Updated: 2023/11/23 13:54:15 by hexplor ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
void ft_striteri(char *s, void (*f)(unsigned int, char *))
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
i = 0;
|
||||
while (*s)
|
||||
{
|
||||
f(i, s);
|
||||
i++;
|
||||
s++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user