39 lines
1.3 KiB
C
39 lines
1.3 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_str_is_uppercase.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/07/18 10:46:58 by cchauvet #+# #+# */
|
|
/* Updated: 2022/07/19 13:10:32 by cchauvet ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
int ft_str_is_uppercase(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_uppercase("AAA")+'0');
|
|
ft_putchar(ft_str_is_uppercase("dfdf5f")+'0');
|
|
ft_putchar(ft_str_is_uppercase("Z")+48);
|
|
ft_putchar(ft_str_is_uppercase("FG5DG")+48);
|
|
ft_putchar(ft_str_is_uppercase("")+48);
|
|
}
|
|
*/
|