init
This commit is contained in:
37
C/c02/ex04/ft_str_is_lowercase.c
Normal file
37
C/c02/ex04/ft_str_is_lowercase.c
Normal file
@ -0,0 +1,37 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_str_is_lowercase.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/07/17 13:51:45 by cchauvet #+# #+# */
|
||||
/* Updated: 2022/07/19 13:09:29 by cchauvet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
int ft_str_is_lowercase(char *str)
|
||||
{
|
||||
while (*str != 0)
|
||||
{
|
||||
if (!('a' <= *str && *str <= 'z'))
|
||||
return (0);
|
||||
str++;
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
/*
|
||||
void ft_putchar(char c)
|
||||
{
|
||||
write(1, &c, 1);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
ft_putchar(ft_str_is_lowercase("ff")+'0');
|
||||
ft_putchar(ft_str_is_lowercase("dfdf5f")+'0');
|
||||
ft_putchar(ft_str_is_lowercase("d")+48);
|
||||
ft_putchar(ft_str_is_lowercase("FG5DG")+48);
|
||||
ft_putchar(ft_str_is_lowercase("")+48);
|
||||
}
|
||||
*/
|
Reference in New Issue
Block a user