Archived
1
0
This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
libft/ft_striteri.c

28 lines
1.0 KiB
C
Raw Normal View History

2023-11-11 15:11:12 +01:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_striteri.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/11 14:15:30 by adjoly #+# #+# */
2023-11-13 17:04:34 +01:00
/* Updated: 2023/11/12 13:59:23 by adjoly ### ########.fr */
2023-11-11 15:11:12 +01:00
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_striteri(char *s, void (*f)(unsigned int, char *))
{
int i;
i = 0;
2023-11-13 17:04:34 +01:00
if (s == NULL || f == NULL)
return ;
2023-11-11 15:11:12 +01:00
while (s[i])
{
f(i, &s[i]);
i++;
}
}