for 中定义的 char 函数(ispace、isalpha 等)是否有任何等价<ctype>
物char32_t
?
我环顾四周,只能看到 iswspace (和相关的),看起来像是 16 位字符。
注意:虽然 isspace 将 int 作为参数,但它似乎会为 Unicode 字符产生错误的结果。
例子:
char32_t dagger = U'';
if (isspace(dagger)) {
puts("That is a space!");
}
将输出“那是一个空格!”