From 8187470c79c209183f04ee253533939f3090ac8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20GUEZO?= Date: Sun, 28 Sep 2025 21:55:55 +0200 Subject: [PATCH] feat: add ft_isascii function --- ft_isascii.c | 4 ++++ libft.h | 1 + 2 files changed, 5 insertions(+) create mode 100644 ft_isascii.c diff --git a/ft_isascii.c b/ft_isascii.c new file mode 100644 index 0000000..a7037b7 --- /dev/null +++ b/ft_isascii.c @@ -0,0 +1,4 @@ +int ft_isascii(int c) +{ + return (c >= 0 && c <= 127); +} \ No newline at end of file diff --git a/libft.h b/libft.h index 5d08a00..69ae0d3 100644 --- a/libft.h +++ b/libft.h @@ -1,3 +1,4 @@ int ft_isalpha(const char c); int ft_isdigit(int c); int ft_isalnum(int c); +int ft_isascii(int c);