📜  过滤掉任何不可打印的字符 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:05.459000             🧑  作者: Mango

代码示例1
int ch, N = 0;
while ((ch = getchar()) != EOF) {
    if (isspace(ch))
        a[N++] = ' ';
    else if (isprint(ch))
        a[N++] = ch;
}