mirror of
https://github.com/guezoloic/libft.git
synced 2026-01-25 03:34:16 +00:00
feat: add ft_isalpha function
This commit is contained in:
2
Makefile
2
Makefile
@@ -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
8
ft_isalpha.c
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user