push
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_str_is_alpha.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: sgongas <sgongas@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/02/22 23:16:47 by sgongas #+# #+# */
|
||||
/* Updated: 2026/02/22 23:21:38 by sgongas ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
int ft_str_is_alpha(char *str)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
while (str[i])
|
||||
{
|
||||
if ((str[i] >= 'a' && str[i] <= 'z')
|
||||
|| (str[i] >= 'A' && str[i] <= 'Z'))
|
||||
i++;
|
||||
else
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
// #include <stdio.h>
|
||||
|
||||
// int main(void)
|
||||
// {
|
||||
// printf("%d", ft_str_is_alpha("sd1asd"));
|
||||
// return (0);
|
||||
// }
|
||||
Reference in New Issue
Block a user