skeletton untested project

This commit is contained in:
thrieg 2025-12-11 06:18:16 +01:00
commit 6fc620e8f4
187 changed files with 6584 additions and 0 deletions

30
libft/ft_striteri.c Executable file
View file

@ -0,0 +1,30 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_striteri.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: thrieg <thrieg@student.42mulhouse.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/15 16:56:31 by thrieg #+# #+# */
/* Updated: 2025/02/16 19:04:45 by thrieg ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
//returns without doing anything if s or f are NULL, this is dumb because we
//can't report the error given the prototyping but I'm not taking any risk for
//my 3th retry...
void ft_striteri(char *s, void (*f)(unsigned int, char*))
{
unsigned int i;
if (!s || !f)
return ;
i = 0;
while (s[i])
{
f(i, &s[i]);
i++;
}
}