diff options
Diffstat (limited to 'src/ft_striteri.c')
| -rw-r--r-- | src/ft_striteri.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ft_striteri.c b/src/ft_striteri.c new file mode 100644 index 0000000..ba701db --- /dev/null +++ b/src/ft_striteri.c @@ -0,0 +1,14 @@ +#include "libft.h" + +void +ft_striteri (char *s, void (*f) (unsigned int, char *)) +{ + unsigned int i; + + i = 0; + while (s[i]) + { + f (i, &s[i]); + i++; + } +} |
