-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_memset.c
More file actions
25 lines (22 loc) · 1.05 KB
/
ft_memset.c
File metadata and controls
25 lines (22 loc) · 1.05 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_memset.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yel-mota <yel-mota@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/09 23:10:49 by yel-mota #+# #+# */
/* Updated: 2025/04/09 23:15:00 by yel-mota ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_memset(void *s, int c, size_t n)
{
size_t i;
unsigned char *p;
p = (unsigned char *)s;
i = 0;
while (i < n)
p[i++] = c;
return ((void *)p);
}