github to gitea
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_str_is_alpha.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: lfirmin <[email protected]> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/02/12 05:59:36 by lfirmin #+# #+# */
|
||||
/* Updated: 2024/02/18 05:00:21 by lfirmin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
int ft_str_is_alpha(char *str)
|
||||
{
|
||||
int c;
|
||||
|
||||
c = 0;
|
||||
while (str[c] != '\0')
|
||||
{
|
||||
if ((str[c] < 'A' || str[c] > 'Z') && (str[c] < 'a' || str[c] > 'z'))
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
c++;
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
/*#include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
char str[] = "hii";
|
||||
int result = ft_str_is_alpha(str);
|
||||
|
||||
if (result)
|
||||
{
|
||||
printf("alphabetique\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("non alphabetique\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}*/
|
||||
Reference in New Issue
Block a user