c 判断是否为非控制字符

 

#include <stdio.h>
#include <wctype.h>
int main ()
{
  int i=0;
  wchar_t str[] = L"first line \n second line \n";
  while (!iswcntrl(str[i]))
  {
    putwchar (str[i]);
    i++;
  }
  return 0;
}

输出

first line

 

posted @ 2019-05-06 23:43  anobscureretreat  阅读(239)  评论(0编辑  收藏  举报