C Tutorial/ctype.h/isspace — различия между версиями
Admin (обсуждение | вклад) м (1 версия: Импорт контента...) |
(нет различий)
|
Текущая версия на 13:32, 25 мая 2010
isspace
Item Value Header file ctype.h Declaration int isspace(int ch); Return returns nonzero if ch is a white-space character, including space, horizontal tab, vertical tab, formfeed, carriage return, or newline character; otherwise zero is returned.
<source lang="cpp">#include <ctype.h>
#include <stdio.h> int main(void) { char ch; for(;;) { ch = getchar(); if(isspace(ch)){ printf("%c is white space\n", ch); } if(ch == "."){ break; } } return 0; }</source>