[function] tolower()

duckkuri·2020년 10월 5일
0

libc_functions

목록 보기
7/22

[function] tolower()

라이브러리 : libc

헤더 : ctype.h

  • 대문자를 소문자로 변환
  • tolower()는 대상 대문자를 일치하는 소문자로 바꿔준다.
  • 인자값으로는 부호없는 문자 또는 EOF로 나타낸다.

형식

tolower(int c);

c : 테스트할 문자

리턴값

int 형 데이터로 리턴

인자값이 대문자인 경우 -> 매칭되는 소문자로 리턴
인자값이 대문자가 아닌 경우 -> 인자값은 바뀌지 않은채 리턴 (인자값 그대로 리턴)

사용 예제

printf("result : %c\n", tolower('A'));	// a
printf("result : %c\n", tolower('a'));	// a

참고 사이트
https://www.freebsd.org/cgi/man.cgi?query=index&sektion=3&apropos=0&manpath=fre

profile
😤 Today I Learned

0개의 댓글