From 1e9b077e0d9f3c50d7d518bf6ea7f08e7f5ec590 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 15 Jan 2020 10:04:09 +0100 Subject: splited src in category, more generic makefile --- src/ctype/ft_isascii.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/ctype/ft_isascii.c (limited to 'src/ctype/ft_isascii.c') diff --git a/src/ctype/ft_isascii.c b/src/ctype/ft_isascii.c new file mode 100644 index 0000000..51dcd1c --- /dev/null +++ b/src/ctype/ft_isascii.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isascii.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/10/07 09:54:30 by cacharle #+# #+# */ +/* Updated: 2019/10/20 13:03:23 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#define MAX_CHAR ((1 << 7) - 1) + +int ft_isascii(int c) +{ + return (c >= 0 && c <= MAX_CHAR); +} -- cgit