ft_isdigit: inital implementation

This commit is contained in:
Khaïs COLIN 2024-10-14 14:48:30 +02:00
parent e793bb4f90
commit e5601d44ab
2 changed files with 22 additions and 2 deletions

View file

@ -6,13 +6,14 @@
# By: kcolin <marvin@42.fr> +#+ +:+ +#+ # # By: kcolin <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ # # +#+#+#+#+#+ +#+ #
# Created: 2024/10/14 13:43:59 by kcolin #+# #+# # # Created: 2024/10/14 13:43:59 by kcolin #+# #+# #
# Updated: 2024/10/14 14:40:26 by kcolin ### ########.fr # # Updated: 2024/10/14 14:44:52 by kcolin ### ########.fr #
# # # #
# **************************************************************************** # # **************************************************************************** #
NAME = libft.a NAME = libft.a
CFLAGS = -Wall -Wextra -Werror -ggdb CFLAGS = -Wall -Wextra -Werror -ggdb
SOURCES = ft_isalpha.c SOURCES = ft_isalpha.c \
ft_isdigit.c
OBJECTS = $(SOURCES:.c=.o) OBJECTS = $(SOURCES:.c=.o)
CC = gcc CC = gcc

19
ft_isdigit.c Normal file
View file

@ -0,0 +1,19 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isdigit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kcolin <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/14 14:41:12 by kcolin #+# #+# */
/* Updated: 2024/10/14 14:46:21 by kcolin ### ########.fr */
/* */
/* ************************************************************************** */
int ft_isdigit(int c)
{
if (c >= '0' && c <= '9')
return (1);
else
return (0);
}