ft_striter.c 1021 B

12345678910111213141516171819202122232425
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* ft_striter.c :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@students.42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2015/11/25 18:21:53 by bchanot #+# #+# */
  9. /* Updated: 2017/11/21 16:35:15 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "libft.h"
  13. void ft_striter(char *s, void (*f)(char *))
  14. {
  15. if (s && f)
  16. {
  17. while (*s)
  18. {
  19. f(&(*s));
  20. s++;
  21. }
  22. }
  23. }