islower()
2015. 4. 14. 11:25ㆍC,C++/C 라이브러리
islower()
인수로 받은 문자가 소문자인지를 판별
헤더 |
ctype.h |
형태 |
int islower( int c) |
인수 |
int c |
반환 |
0 != c는 소문자 0 = c는 소문자가 아님 |
예제
#include <stdio.h>
#include <ctype.h>
void mian()
{
int ch1 = 'a';
int ch2 = 'A';
if(islower(ch1))
printf("%c 는 소문자 입니다 \n",ch1);
else
printf("%c는 소문자가 아닙니다 \n",ch1);
if(islower(ch2))
printf("%c 는 소문자 입니다 \n",ch2);
else
printf("%c는 소문자가 아닙니다 \n",ch2);
}
--------------------------------------
결과 :
a는 소문자입니다.
A는 소문자가 아닙니다.
'C,C++ > C 라이브러리' 카테고리의 다른 글
문자열 복사 함수 strcpy(), strncpy() (0) | 2015.04.14 |
---|---|
문자열 비교함수 strcmp, strcasecmp, strncasecmp (0) | 2015.04.14 |
ispuct() (0) | 2015.04.14 |
isprint() (0) | 2015.04.14 |
isgraph() (0) | 2015.04.14 |