-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathft_memset.c
More file actions
28 lines (25 loc) · 1.07 KB
/
ft_memset.c
File metadata and controls
28 lines (25 loc) · 1.07 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
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_memset.c :+: :+: */
/* +:+ */
/* By: ksmorozo <ksmorozo@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/09 11:29:07 by ksmorozo #+# #+# */
/* Updated: 2020/12/03 00:06:10 by anonymous ######## odam.nl */
/* */
/* ************************************************************************** */
#include <stddef.h>
void *ft_memset(void *str, int c, size_t n)
{
size_t count;
char *buffer;
count = 0;
buffer = str;
while (count < n)
{
buffer[count] = c;
count++;
}
return (buffer);
}