-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_bzero.c
More file actions
32 lines (28 loc) · 1.09 KB
/
ft_bzero.c
File metadata and controls
32 lines (28 loc) · 1.09 KB
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
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_bzero.c :+: :+: */
/* +:+ */
/* By: farodrig <farodrig@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/27 18:13:44 by farodrig #+# #+# */
/* Updated: 2021/02/05 12:40:31 by farodrig ######## odam.nl */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
** Writes len zeroed bytes to the string str.
*/
void ft_bzero(void *str, size_t len)
{
unsigned char *ptr;
unsigned int i;
ptr = str;
i = 0;
while (len)
{
ptr[i] = 0;
i++;
len--;
}
}