-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strclr.c
30 lines (26 loc) · 1.13 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strclr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aviholai <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/12/14 14:21:42 by aviholai #+# #+# */
/* Updated: 2022/02/09 16:37:51 by aviholai ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
** 'Strclr()' (String clear) counts the length of a string applied as a
** parameter and clears it with the value of '\0'.
*/
void ft_strclr(char *s)
{
unsigned int i;
if (s)
{
i = 0;
while (s[i] != '\0')
s[i++] = '\0';
}
}