ft_isprint: initial implementation

This commit is contained in:
Khaïs COLIN 2024-10-14 15:09:25 +02:00
parent 359cc601e9
commit 3001be14f1
2 changed files with 22 additions and 2 deletions

View file

@ -6,7 +6,7 @@
# By: kcolin <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/10/14 13:43:59 by kcolin #+# #+# #
# Updated: 2024/10/14 14:57:24 by kcolin ### ########.fr #
# Updated: 2024/10/14 15:02:59 by kcolin ### ########.fr #
# #
# **************************************************************************** #
@ -15,7 +15,8 @@ CFLAGS = -Wall -Wextra -Werror -ggdb
SOURCES = ft_isalpha.c \
ft_isdigit.c \
ft_isalnum.c \
ft_isascii.c
ft_isascii.c \
ft_isprint.c
OBJECTS = $(SOURCES:.c=.o)
CC = gcc

19
ft_isprint.c Normal file
View file

@ -0,0 +1,19 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isprint.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kcolin <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/14 15:03:08 by kcolin #+# #+# */
/* Updated: 2024/10/14 15:04:52 by kcolin ### ########.fr */
/* */
/* ************************************************************************** */
int ft_isprint(int c)
{
if (c >= 0x20 && c <= 0x7e)
return (1);
else
return (0);
}