wctrans

문자 코드 집합 간의 매핑을 결정합니다.

구문

wctrans_t wctrans(
   const char *property
);

매개 변수

property
유효한 변환 중 하나를 지정하는 문자열입니다.

반환 값

LC_CTYPE 현재 로캘의 범주에서 이름이 속성 문자열property과 일치하는 매핑을 정의하지 않으면 함수는 0을 반환합니다. 그렇지 않으면 후속 호출에 대한 두 번째 인수로 사용하기에 적합한 0이 아닌 값을 반환합니다 towctrans.

설명

이 함수는 문자 코드 집합 간의 매핑을 결정합니다.

다음 호출 쌍은 모든 로캘에서 동일한 동작을 갖지만 "C" 로캘에서도 더 많은 매핑을 정의할 수 있습니다.

함수 동일한 항목
tolower(c) towctrans(c, wctrans("towlower"))
towupper(c) towctrans(c, wctrans("toupper"))

요구 사항

루틴에서 반환된 값 필수 헤더
wctrans <wctype.h>

호환성에 대한 자세한 내용은 호환성을 참조하세요.

예시

// crt_wctrans.cpp
// compile with: /EHsc
// This example determines a mapping from one set of character
// codes to another.

#include <wchar.h>
#include <wctype.h>
#include <stdio.h>
#include <iostream>

int main()
{
    wint_t c = 'a';
    printf_s("%d\n",c);

    wctrans_t i = wctrans("toupper");
    printf_s("%d\n",i);

    wctrans_t ii = wctrans("towlower");
    printf_s("%d\n",ii);

    wchar_t wc = towctrans(c, i);
    printf_s("%d\n",wc);
}
97
1
0
65

참고 항목

데이터 변환
setlocale, _wsetlocale