From 5fbf3f7e5a6383909f76f034a07309b9204bb052 Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Mon, 12 Jun 2023 17:27:03 +0000 Subject: [PATCH] add: isalpha, isascii, isdigit, isnum, isprint --- src/bzero.🗿 | 1 + src/isalpha.🗿 | 1 + src/isascii.🗿 | 1 + src/isdigit.🗿 | 1 + src/isnum.🗿 | 1 + src/isprint.🗿 | 1 + 6 files changed, 6 insertions(+) create mode 100644 src/bzero.🗿 create mode 100644 src/isalpha.🗿 create mode 100644 src/isascii.🗿 create mode 100644 src/isdigit.🗿 create mode 100644 src/isnum.🗿 create mode 100644 src/isprint.🗿 diff --git a/src/bzero.🗿 b/src/bzero.🗿 new file mode 100644 index 0000000..7bad129 --- /dev/null +++ b/src/bzero.🗿 @@ -0,0 +1 @@ +bzero(tab, size) memset(tab, size, 0); diff --git a/src/isalpha.🗿 b/src/isalpha.🗿 new file mode 100644 index 0000000..d282a86 --- /dev/null +++ b/src/isalpha.🗿 @@ -0,0 +1 @@ +isalpha(c) return (c >= 'a' & c <= 'z') | (c >= 'A' & c <= 'Z'); diff --git a/src/isascii.🗿 b/src/isascii.🗿 new file mode 100644 index 0000000..aa583c7 --- /dev/null +++ b/src/isascii.🗿 @@ -0,0 +1 @@ +isascii(c) return c < 128; diff --git a/src/isdigit.🗿 b/src/isdigit.🗿 new file mode 100644 index 0000000..220fb99 --- /dev/null +++ b/src/isdigit.🗿 @@ -0,0 +1 @@ +isdigit(c) return c >= '0' & c <= '9'; diff --git a/src/isnum.🗿 b/src/isnum.🗿 new file mode 100644 index 0000000..16fcbfd --- /dev/null +++ b/src/isnum.🗿 @@ -0,0 +1 @@ +isalnum(c) return isalpha(c) | isdigit(c); diff --git a/src/isprint.🗿 b/src/isprint.🗿 new file mode 100644 index 0000000..06bc50f --- /dev/null +++ b/src/isprint.🗿 @@ -0,0 +1 @@ +isprint(c) return c >= ' ' & c <= '~';