feat: add ft_isalpha function

This commit is contained in:
2025-09-28 21:27:50 +02:00
parent 60a2281dd2
commit f0af8e2225
4 changed files with 10 additions and 5 deletions

View File

@@ -10,7 +10,7 @@ OBJ = $(SRC:.c=.o)
CFLAGS = -Wall -Wextra -Werror -pedantic
$(LIB): $(OBJ) # <--- OBJ will run $.o: %.c pattern
$(STATIC) $(LIB) $(OBJ)
$(STATIC) $(LIB) $(OBJ)
%.o: %.c # <--- compile any .c file into its corresponding .o automatically
${CC} ${CFLAGS} -c $< -o $@

8
ft_isalpha.c Normal file
View File

@@ -0,0 +1,8 @@
#include "libft.h"
int ft_isalpha(const char c)
{
if ((c > 65 && c < 90) || (c > 97 && c < 122))
return (1);
return (0);
}

1
libft.h Normal file
View File

@@ -0,0 +1 @@
int ft_isalpha(const char c);

4
test.c
View File

@@ -1,4 +0,0 @@
void test(void)
{
return ;
}