isalnum.c
来自「这是一个同样来自贝尔实验室的和UNIX有着渊源的操作系统, 其简洁的设计和实现易」· C语言 代码 · 共 25 行
C
25 行
#include <ctype.h>#undef isalnum#undef isalpha#undef iscntrl#undef isdigit#undef isgraph#undef islower#undef isprint#undef ispunct#undef isspace#undef isupper#undef isxdigitint isalnum(int c){ return (_ctype+1)[c]&(_ISupper|_ISlower|_ISdigit); }int isalpha(int c){ return (_ctype+1)[c]&(_ISupper|_ISlower); }int iscntrl(int c){ return (_ctype+1)[c]&_IScntrl; }int isdigit(int c){ return (_ctype+1)[c]&_ISdigit; }int isgraph(int c){ return (_ctype+1)[c]&(_ISpunct|_ISupper|_ISlower|_ISdigit); }int islower(int c){ return (_ctype+1)[c]&_ISlower; }int isprint(int c){ return (_ctype+1)[c]&(_ISpunct|_ISupper|_ISlower|_ISdigit|_ISblank); }int ispunct(int c){ return (_ctype+1)[c]&_ISpunct; }int isspace(int c){ return (_ctype+1)[c]&_ISspace; }int isupper(int c){ return (_ctype+1)[c]&_ISupper; }int isxdigit(int c){ return (_ctype+1)[c]&_ISxdigit; }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?