/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_striteri.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/09 13:57:34 by rparodi #+# #+# */ /* Updated: 2024/10/31 18:11:04 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" /** * @brief Applies a function to each character of a string. * * @param s The string to modify. * @param f The function to apply to each character. * * @return void */ void ft_striteri(char *s, void (*f)(unsigned int, char*)) { size_t i; i = 0; while (s[i] != '\0') { f(i, s + i); i++; } }