-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_memset.c
20 lines (18 loc) · 1008 Bytes
/
ft_memset.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memset.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rvandepu <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/18 12:03:00 by rvandepu #+# #+# */
/* Updated: 2023/10/18 16:05:30 by rvandepu ### ########.fr */
/* */
/* ************************************************************************** */
#include <stddef.h>
void *ft_memset(void *s, int c, size_t n)
{
while (n--)
((char *) s)[n] = c;
return (s);
}