/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_striteri.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: grobledo +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/02/20 22:29:06 by grobledo #+# #+# */ /* Updated: 2023/02/20 22:29:07 by grobledo ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" void ft_striteri(char *s, void (*f)(unsigned int, char*)) { size_t i; if (!s || !(*f)) return ; i = 0; while (i < ft_strlen(s)) { (*f)(i, &s[i]); i++; } }