init
This commit is contained in:
24
Correction/levv/ex02/ft_str_is_alpha.c
Normal file
24
Correction/levv/ex02/ft_str_is_alpha.c
Normal file
@ -0,0 +1,24 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_str_is_alpha.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/07/17 13:51:45 by cchauvet #+# #+# */
|
||||
/* Updated: 2022/07/17 15:22:03 by cchauvet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
int ft_str_is_alpha(char *str)
|
||||
{
|
||||
while (*str != 0)
|
||||
{
|
||||
if (!(('a' <= *str && *str <= 'z') || ('A' <= *str && 'Z' >= *str)))
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
str++;
|
||||
}
|
||||
return (1);
|
||||
}
|
Reference in New Issue
Block a user