-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strclr.c
executable file
·31 lines (27 loc) · 1.05 KB
/
ft_strclr.c
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
29
30
31
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strclr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ngouy <ngouy@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2014/11/06 13:10:17 by ngouy #+# #+# */
/* Updated: 2015/11/04 16:48:36 by ngouy ### ########.fr */
/* */
/* ************************************************************************** */
/*
** Clear a string by filling it with '/0'
*/
#include "libft.h"
void ft_strclr(char *s)
{
char *pt;
if (!s)
return ;
pt = s;
while (*pt)
{
*pt = '\0';
pt++;
}
}