-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_memset.c
23 lines (21 loc) · 1 KB
/
ft_memset.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_memset.c :+: :+: */
/* +:+ */
/* By: lbartels <lbartels@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2023/10/03 10:32:29 by lbartels #+# #+# */
/* Updated: 2023/10/26 19:53:10 by lbartels ######## odam.nl */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memset(void *s, int c, size_t n)
{
while (n > 0)
{
((char *)s)[n - 1] = c;
n--;
}
return (s);
}