-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_s_strlen.c
More file actions
executable file
·28 lines (25 loc) · 1.08 KB
/
ft_s_strlen.c
File metadata and controls
executable file
·28 lines (25 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_s_strlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: luperez <luperez@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2014/11/27 05:53:42 by luperez #+# #+# */
/* Updated: 2014/11/27 07:10:05 by luperez ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_s_strlen(t_str *str)
{
int i;
i = 0;
if (!str || !str->str)
ft_putstr("s_strlen error: empty cell.");
while (str)
{
i += ft_strlen(str->str);
str = str->next;
}
return (i);
}