-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_bzero.c
46 lines (40 loc) · 1.33 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_bzero.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yuske <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/12 03:15:22 by yfurutat #+# #+# */
/* Updated: 2022/11/19 03:26:24 by yuske ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
//1. 11L
// void ft_bzero(void *str, size_t n)
// {
// unsigned int i;
// char *str_caster;
// i = 0;
// str_caster = (char *)str;
// while (i < n)
// {
// str_caster[i] = 0;
// i++;
// }
// }
//2. 7L
// void ft_bzero(void *str, size_t n)
// {
// size_t i;
// char *str_caster;
// i = 0;
// str_caster = (char *)str;
// while (i < n)
// str_caster[i++] = 0;
// }
//3
void ft_bzero(void *str, size_t n)
{
ft_memset(str, 0, n);
}