-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_str_is_lowercase.c
31 lines (29 loc) · 1.17 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_str_is_lowercase.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: pix <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/02/18 03:49:52 by pix #+# #+# */
/* Updated: 2022/04/04 03:08:04 by pix ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Checks if s is an lowercase string.
*
* @param s String value to check
*
* @return (int) Nonzero if s is an lowercase string and zero if not
*/
int ft_str_is_lowercase(char *s)
{
while (*s)
{
if (*s < 'a' || *s > 'z')
return (0);
s++;
}
return (1);
}