ft_str_is_lowercase.c

This commit is contained in:
Timo Schmidt 2023-03-19 11:12:08 +01:00
parent 3a3fb2e0e3
commit b68ced862c
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_str_is_lowercase.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/19 11:03:56 by tischmid #+# #+# */
/* Updated: 2023/03/19 11:12:03 by tischmid ### ########.fr */
/* */
/* ************************************************************************** */
int ft_str_is_lowercase(char *str)
{
int i;
i = 0;
while(str[i] >= 'a' && str[i] <= 'z')
{
++i;
}
return (str[i] == '\0');
}
/* ////
#include <stdio.h>
int main(void)
{
char s[] = "abcdef";
printf("%d\n", ft_str_is_lowercase(s));
return (0);
}
*/ ////