base c lib without external lib
This commit is contained in:
21
ft_bzero.c
Normal file
21
ft_bzero.c
Normal file
@@ -0,0 +1,21 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_bzero.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/11/05 11:41:08 by dgaillet #+# #+# */
|
||||
/* Updated: 2025/11/05 11:44:03 by dgaillet ### ########lyon.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
void ft_bzero(void *s, size_t n)
|
||||
{
|
||||
if (n <= 0)
|
||||
return ;
|
||||
*((char *) s) = '\0';
|
||||
ft_bzero(s + 1, n - 1);
|
||||
}
|
||||
Reference in New Issue
Block a user