add: isdigit

This commit is contained in:
starnakin 2024-09-06 23:53:58 +02:00
parent e58fdc20b6
commit 8d9ebecadd
2 changed files with 39 additions and 0 deletions

35
headers/ctype.h Normal file
View File

@ -0,0 +1,35 @@
#pragma once
/*
int isalnum(int c);
int isalpha(int c);
int iscntrl(int c);
*/
int isdigit(int c);
/*
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int isascii(int c);
int isblank(int c);
int isalnum_l(int c, locale_t locale);
int isalpha_l(int c, locale_t locale);
int isblank_l(int c, locale_t locale);
int iscntrl_l(int c, locale_t locale);
int isdigit_l(int c, locale_t locale);
int isgraph_l(int c, locale_t locale);
int islower_l(int c, locale_t locale);
int isprint_l(int c, locale_t locale);
int ispunct_l(int c, locale_t locale);
int isspace_l(int c, locale_t locale);
int isupper_l(int c, locale_t locale);
int isxdigit_l(int c, locale_t locale);
int isascii_l(int c, locale_t locale);
*/

4
src/ctype/isdigit.c Normal file
View File

@ -0,0 +1,4 @@
int isdigit(int c)
{
return '9' >= c && c >= '0';
}