mirror of
https://github.com/Ladebeze66/libft.git
synced 2025-12-13 04:36:55 +01:00
26 lines
1.0 KiB
C
Executable File
26 lines
1.0 KiB
C
Executable File
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_striteri.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/02/16 14:25:00 by fgras-ca #+# #+# */
|
|
/* Updated: 2023/11/14 17:08:02 by fgras-ca ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
void ft_striteri(char *s, void (*f)(unsigned int, char*))
|
|
{
|
|
unsigned int i;
|
|
|
|
if (!s)
|
|
return ;
|
|
i = 0;
|
|
while (s[i])
|
|
{
|
|
f(i, &s[i]);
|
|
i++;
|
|
}
|
|
}
|