aboutsummaryrefslogtreecommitdiff
path: root/ft_isascii.c
diff options
context:
space:
mode:
Diffstat (limited to 'ft_isascii.c')
-rw-r--r--ft_isascii.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ft_isascii.c b/ft_isascii.c
new file mode 100644
index 0000000..7742ded
--- /dev/null
+++ b/ft_isascii.c
@@ -0,0 +1,6 @@
+#define MAX_CHAR ((1 << 7) - 1)
+
+int ft_isascii(int c)
+{
+ return (c >= 0 && c <= MAX_CHAR);
+}