ft_striteri.c 1.0 KB

1234567891011121314151617181920212223
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* ft_striteri.c :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: mazimi <mazimi@student.42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2014/11/06 20:45:58 by mazimi #+# #+# */
  9. /* Updated: 2014/12/02 16:03:35 by mazimi ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "../libft.h"
  13. void ft_striteri(char *s, void (*f)(unsigned int, char *))
  14. {
  15. unsigned int i;
  16. i = -1;
  17. if (s && f)
  18. while (*s)
  19. f(++i, s++);
  20. }