#include <ctype.h>
int islower( int ch );
如果参数是小写字母字符,函数返回非零值,否则返回零值。
#include <stdio.h> #include <ctype.h> int main() { char c1 = 'A'; char c2 = 'a'; printf("islower(c1) = %d\n", islower(c1)); printf("islower(c2) = %d\n", islower(c2)); return 0; }
输出结果:
islower(c1) = 0 islower(c2) = 2