-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isstrempty.c
executable file
·30 lines (27 loc) · 1.12 KB
/
ft_isstrempty.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
/* ************************************************************************** */
/* LE - / */
/* / */
/* ft_isstrempty.c .:: .:/ . .:: */
/* +:+:+ +: +: +:+:+ */
/* By: brobicho <[email protected]> +:+ +: +: +:+ */
/* #+# #+ #+ #+# */
/* Created: 2018/08/12 11:33:20 by brobicho #+# ## ## #+# */
/* Updated: 2018/08/12 16:12:10 by brobicho ### #+. /#+ ###.fr */
/* / */
/* / */
/* ************************************************************************** */
#include "libft.h"
int ft_isstrempty(char *str)
{
int i;
i = 0;
if (!str)
return (-1);
while (str[i])
{
if (!IS_SP(str[i]))
return (1);
i++;
}
return (0);
}