wctrans

에서는 문자 코드 집합을 하나씩 매핑을 결정합니다.

wctrans_t wctrans(
   const char *property 
);

매개 변수

  • property
    올바른 변환 중 하나를 지정 하는 문자열입니다.

반환 값

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

설명

이 함수에서는 문자 코드 집합을 하나씩 매핑을 확인합니다.

쌍 호출을 모든 로케일에서 동일 하 게 동작 해야 하지만 "C" 로케일에도 추가 매핑을 정의할 수 있습니다.

Function

동일

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);
}
  

참고 항목

참조

데이터 변환

setlocale을 _wsetlocale