init
This commit is contained in:
35
Correction/thellego/ex04/ft_str_is_lowercase.c
Normal file
35
Correction/thellego/ex04/ft_str_is_lowercase.c
Normal file
@ -0,0 +1,35 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_str_is_lowercase.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: thellego <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/07/17 12:01:10 by thellego #+# #+# */
|
||||
/* Updated: 2022/07/17 12:09:09 by thellego ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
int ft_str_is_lowercase(char *str)
|
||||
{
|
||||
int counter;
|
||||
|
||||
counter = 0;
|
||||
while (str[counter])
|
||||
{
|
||||
if (97 <= str[counter] && str[counter] <= 122)
|
||||
{
|
||||
counter++;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
/* int main()
|
||||
{
|
||||
char tab1[120] = "hello world";
|
||||
ft_str_is_lowercase(tab1);
|
||||
} */
|
Reference in New Issue
Block a user