From eeeef79e4cd50e605ae34e2f246f42a0edb25607 Mon Sep 17 00:00:00 2001 From: Tanguy MAZE Date: Wed, 4 Apr 2018 12:37:18 +0200 Subject: [PATCH] ft_isprint --- Makefile | 5 +++-- ft_isprint.c | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 ft_isprint.c diff --git a/Makefile b/Makefile index bea0716..0eed71e 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # By: tmaze +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2018/04/04 10:51:59 by tmaze #+# #+# # -# Updated: 2018/04/04 12:25:53 by tmaze ### ########.fr # +# Updated: 2018/04/04 12:32:19 by tmaze ### ########.fr # # # #******************************************************************************# @@ -19,7 +19,8 @@ NAME = libft.a SRCS = ft_isalpha.c \ ft_isdigit.c \ ft_isalnum.c \ - ft_isascii.c + ft_isascii.c \ + ft_isprint.c OBJS = $(SRCS:.c=.o) INCLS = -I. diff --git a/ft_isprint.c b/ft_isprint.c new file mode 100644 index 0000000..d57ba58 --- /dev/null +++ b/ft_isprint.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isprint.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: tmaze +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2018/04/04 12:29:36 by tmaze #+# #+# */ +/* Updated: 2018/04/04 12:30:28 by tmaze ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int ft_isprint(int c) +{ + return (c >= 32 && c <= 126); +}