-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_bzero.c
27 lines (24 loc) · 1.05 KB
/
ft_bzero.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_bzero.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ysoroko <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/11/17 09:37:38 by ysoroko #+# #+# */
/* Updated: 2020/11/30 18:36:42 by ysoroko ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_bzero(void *str, size_t n)
{
size_t i;
unsigned char *my_str;
i = 0;
my_str = (unsigned char *)(str);
while (i < n)
{
my_str[i] = '\0';
i++;
}
}