mirror of
https://github.com/Ladebeze66/Piscine42.git
synced 2025-12-16 05:58:07 +01:00
35 lines
1.1 KiB
C
Executable File
35 lines
1.1 KiB
C
Executable File
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_str_is_alpha.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: fgras-ca <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/12/07 14:06:49 by fgras-ca #+# #+# */
|
|
/* Updated: 2022/12/10 17:05:15 by fgras-ca ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
int ft_str_is_alpha(char *str)
|
|
{
|
|
int i;
|
|
|
|
i = 0;
|
|
if (str[i] == '\0')
|
|
{
|
|
return (1);
|
|
}
|
|
while (str[i] != '\0')
|
|
{
|
|
if ((str[i] >= 65 && str[i] <= 90) || (str[i] >= 97 && str[i] <= 122))
|
|
{
|
|
i++;
|
|
}
|
|
else
|
|
{
|
|
return (0);
|
|
}
|
|
}
|
|
return (1);
|
|
}
|