-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_str_is_lowercase.c
29 lines (26 loc) · 1.07 KB
/
ft_str_is_lowercase.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_str_is_lowercase.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmaraval <tmaraval@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/11/17 09:10:46 by tmaraval #+# #+# */
/* Updated: 2017/11/17 09:44:10 by tmaraval ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_str_is_lowercase(const char *s)
{
int i;
i = 0;
if (s == NULL)
return (0);
while (s[i] != '\0')
{
if (s[i] < 'a' || s[i] > 'z')
return (0);
i++;
}
return (1);
}