diff --git a/ft_bzero.c b/ft_bzero.c new file mode 100644 index 0000000..d5230c2 --- /dev/null +++ b/ft_bzero.c @@ -0,0 +1,6 @@ +#include "libft.h" + +void ft_bzero(void *s, size_t n) +{ + ft_memset(s, 0, n); +} diff --git a/libft.h b/libft.h index c7df153..7375bd7 100644 --- a/libft.h +++ b/libft.h @@ -55,4 +55,10 @@ size_t ft_strlen(const char *s); */ void *ft_memset(void *b, int c, size_t len); +/* + The bzero() function writes n zeroed + bytes to the string s. +*/ +void ft_bzero(void *s, size_t n); + #endif