⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tiswctype.c

📁 Newlib 嵌入式 C库 标准实现代码
💻 C
字号:
#include <wctype.h>#include <newlib.h>#include "check.h"int main(){  wctype_t x;  x = wctype ("alpha");  CHECK (x != 0);  CHECK (iswctype (L'a', x) && isalpha ('a'));  x = wctype ("alnum");  CHECK (x != 0);  CHECK (iswctype (L'0', x) && isalnum ('0'));  x = wctype ("blank");  CHECK (x != 0);  CHECK (iswctype (L' ', x) && isblank (' '));  x = wctype ("cntrl");  CHECK (x != 0);  CHECK (iswctype (L'\n', x) && iscntrl ('\n'));  x = wctype ("digit");  CHECK (x != 0);  CHECK (iswctype (L'7', x) && isdigit ('7'));  x = wctype ("graph");  CHECK (x != 0);  CHECK (iswctype (L'!', x) && isgraph ('!'));  x = wctype ("lower");  CHECK (x != 0);  CHECK (iswctype (L'k', x) && islower ('k'));  x = wctype ("print");  CHECK (x != 0);  CHECK (iswctype (L'@', x) && isprint ('@'));  x = wctype ("punct");  CHECK (x != 0);  CHECK (iswctype (L'.', x) && ispunct ('.'));  x = wctype ("space");  CHECK (x != 0);  CHECK (iswctype (L'\t', x) && isspace ('\t'));  x = wctype ("upper");  CHECK (x != 0);  CHECK (iswctype (L'T', x) && isupper ('T'));  x = wctype ("xdigit");  CHECK (x != 0);  CHECK (iswctype (L'B', x) && isxdigit ('B'));  x = wctype ("unknown");  CHECK (x == 0);  exit (0);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -