feature: add a few helpers fn (is...)

fix: print unprintable characters no longer occurs
This commit is contained in:
2024-10-11 13:10:47 +02:00
parent 29b59c474d
commit 41786ea523
7 changed files with 45 additions and 15 deletions

View File

@ -1,11 +1,11 @@
#pragma once
/*
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
*/
int isdigit(int c);
int isalpha(int c);
int isalnum(int c);
/*
int isgraph(int c);
int islower(int c);

View File

@ -0,0 +1,6 @@
#include "ctype.h"
int isalnum(int c)
{
return isalpha(c) || isdigit(c);
}

View File

@ -0,0 +1,4 @@
int isalpha(int c)
{
return ('Z' >= c && c >= 'A') || ('z' >= c && c >= 'a');
}