ft_strclr.c 1.0 KB

123456789101112131415161718192021222324
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* ft_strclr.c :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@students.42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2015/11/25 18:16:43 by bchanot #+# #+# */
  9. /* Updated: 2015/11/28 23:24:29 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "libft.h"
  13. void ft_strclr(char *s)
  14. {
  15. int cpt;
  16. if (s == NULL)
  17. return ;
  18. cpt = ft_strlen(s);
  19. while (cpt--)
  20. s[cpt] = '\0';
  21. }