-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_memset.c
More file actions
28 lines (24 loc) · 1.08 KB
/
Copy pathft_memset.c
File metadata and controls
28 lines (24 loc) · 1.08 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: framos-p <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/05/12 16:02:16 by framos-p #+# #+# */
/* Updated: 2022/05/20 17:41:43 by framos-p ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
// ft_memset(s, '\0', n); Altra manera de fer-ho
void *ft_memset(void *b, int c, size_t len)
{
size_t i;
i = 0;
while (i < len)
{
((unsigned char *)b)[i] = c;
i++;
}
return (b);
}