diff options
author | Ian Moffett <ian@osmora.org> | 2025-08-10 04:32:47 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-08-10 04:32:58 -0400 |
commit | 56e7673cc083b52e0d68354b28f360fe4d1791f3 (patch) | |
tree | 2e4693577c4f48dee1f5599568728a03740d87d9 | |
parent | 0976eef35ab1c557238a87f253888a4d2dd1bf52 (diff) |
lib: libc: Add isascii() in ctype.h
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | lib/libc/include/ctype.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libc/include/ctype.h b/lib/libc/include/ctype.h index 0ff9a43..2a827e3 100644 --- a/lib/libc/include/ctype.h +++ b/lib/libc/include/ctype.h @@ -36,6 +36,12 @@ __BEGIN_DECLS __always_inline static inline int +__isascii(int c) +{ + return c >= 0 && c <= 127; +} + +__always_inline static inline int __tolower(int c) { return c | 0x20; @@ -92,4 +98,7 @@ __END_DECLS /* Is a space? */ #define isspace(C) __isspace((C)) +/* Is ascii? */ +#define isascii(C) __isascii((C)) + #endif /* _CTYPE_H */ |