-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_tablen.c
28 lines (25 loc) · 1.05 KB
/
ft_tablen.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_tablen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: chrhuang <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/13 16:01:31 by chrhuang #+# #+# */
/* Updated: 2018/11/14 10:20:21 by chrhuang ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
size_t ft_tablen(const char **tab)
{
size_t i;
i = 0;
if (tab == NULL)
return (0);
while (*tab != NULL)
{
tab = tab + 1;
i = i + 1;
}
return (i);
}