libft
src
ft_strclr.c
Go to the documentation of this file.
1
/* ************************************************************************** */
3
/* */
4
/* ::: :::::::: */
5
/* ft_strclr.c :+: :+: :+: */
6
/* +:+ +:+ +:+ */
7
/* By: unite <marvin@42.fr> +#+ +:+ +#+ */
8
/* +#+#+#+#+#+ +#+ */
9
/* Created: 2019/09/05 00:38:26 by unite #+# #+# */
10
/* Updated: 2020/07/16 02:51:09 by unite ### ########.fr */
11
/* */
12
/* ************************************************************************** */
13
14
#include "
libft.h
"
15
21
void
ft_strclr
(
char
*s)
22
{
23
if
(!s)
24
return ;
25
ft_memset
(s, 0,
ft_strlen
(s));
26
}
ft_strlen
size_t ft_strlen(const char *s)
Replicates behaviour of strlen from libc.
Definition:
ft_strlen.c:20
ft_memset
void * ft_memset(void *b, int c, size_t len)
Replicates behaviour of memset from libc.
Definition:
ft_memset.c:20
libft.h
ft_strclr
void ft_strclr(char *s)
Sets each character of a string to 0.
Definition:
ft_strclr.c:21
Generated by
1.8.16