-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_str_is_lowercase.c
38 lines (34 loc) · 1.13 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
30
31
32
33
34
35
36
37
38
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_str_is_lowercase.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sbin-jef <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/08 12:11:18 by sbin-jef #+# #+# */
/* Updated: 2024/05/09 11:23:51 by sbin-jef ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
int check(char x)
{
if (x >= 'a' && x <= 'z')
{
return (1);
}
return (0);
}
int ft_str_is_lowercase(char *str)
{
int low;
low = 0;
while (str[low] != '\0')
{
if (!check(str[low]))
{
return (0);
}
low++;
}
return (1);
}