-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_memset.c
More file actions
23 lines (20 loc) · 1.04 KB
/
ft_memset.c
File metadata and controls
23 lines (20 loc) · 1.04 KB
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: oishchen <oishchen@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/03/10 18:04:46 by oishchen #+# #+# */
/* Updated: 2025/03/11 18:58:50 by oishchen ### ########.fr */
/* */
/* ************************************************************************** */
#include <stddef.h>
void *ft_memset(void *src, int to, size_t len)
{
unsigned char *ptr;
ptr = (unsigned char *)src;
while (len--)
*(ptr)++ = to;
return (src);
}