Standard library header <wchar.h> (C95)
From cppreference.net
이 헤더는 null-terminated wide strings 라이브러리의 일부입니다.
목차 |
함수
숫자 형식으로의 변환 |
|
|
(C95)
(C99)
|
와이드 문자열을 정수 값으로 변환
(함수) |
|
(C95)
(C99)
|
와이드 문자열을 부호 없는 정수 값으로 변환
(함수) |
|
(C99)
(C95)
(C99)
|
와이드 문자열을 부동 소수점 값으로 변환
(함수) |
문자열 조작 |
|
|
(C95)
(C11)
|
와이드 문자열을 다른 문자열로 복사
(함수) |
|
(C95)
(C11)
|
한 문자열에서 다른 문자열로 일정량의 와이드 문자를 복사합니다
(함수) |
|
(C95)
(C11)
|
하나의 와이드 문자열 복사본을 다른 문자열에 추가합니다
(함수) |
|
(C95)
(C11)
|
하나의 와이드 문자열에서 특정 개수의 와이드 문자를 다른 와이드 문자열에 추가함
(함수) |
|
(C95)
|
와이드 문자열을 변환하여
wcscmp
가
wcscoll
와 동일한 결과를 생성하도록 함
(함수) |
문자열 검사 |
|
|
(C95)
(C11)
|
와이드 문자열의 길이를 반환합니다
(함수) |
|
(C95)
|
두 개의 와이드 문자열을 비교합니다
(함수) |
|
(C95)
|
두 개의 와이드 문자열에서 지정된 수의 문자를 비교합니다
(함수) |
|
(C95)
|
현재 로캘에 따라 두 개의 와이드 문자열을 비교합니다
(함수) |
|
(C95)
|
와이드 문자열에서 와이드 문자의 첫 번째 발생 위치를 찾습니다
(함수) |
|
(C95)
|
와이드 문자열에서 와이드 문자의 마지막 발생 위치를 찾습니다
(함수) |
|
(C95)
|
다른 와이드 문자열에서 발견되는 와이드 문자들로만 구성된
최대 초기 세그먼트의 길이를 반환합니다 (함수) |
|
(C95)
|
다른 와이드 문자열에 없는 와이드 문자들로만 구성된
최대 초기 세그먼트의 길이를 반환합니다 (함수) |
|
(C95)
|
하나의 와이드 문자열에서 다른 와이드 문자열에 있는 와이드 문자 중 첫 번째 위치를 찾습니다
(함수) |
|
(C95)
|
다른 와이드 문자열에서 와이드 문자열의 첫 번째 발생을 찾습니다
(함수) |
|
(C95)
(C11)
|
와이드 문자열에서 다음 토큰을 찾음
(함수) |
와이드 문자 배열 조작 |
|
|
(C95)
(C11)
|
두 개의 겹치지 않는 배열 사이에서 지정된 개수의 와이드 문자를 복사합니다
(함수) |
|
(C95)
(C11)
|
두 개의, 가능하게 중첩되는 배열 사이에서 특정량의 와이드 문자를 복사합니다
(함수) |
|
(C95)
|
두 배열에서 지정된 개수의 와이드 문자를 비교합니다
(함수) |
|
(C95)
|
와이드 문자 배열에서 첫 번째 와이드 문자 발생을 찾습니다
(함수) |
|
(C95)
|
주어진 와이드 문자를 와이드 문자 배열의 모든 위치에 복사합니다
(함수) |
타입
|
wchar_t
|
모든 유효한 와이드 문자를 저장할 수 있는 정수형
(typedef) |
|
wint_t
(C95)
|
모든 유효한 와이드 문자와 최소 하나 이상의 추가 값을 저장할 수 있는 정수형
(typedef) |
매크로
|
WEOF
(C95)
|
wint_t
타입의 비문자 값으로 오류를 나타내는 데 사용됨
(매크로 상수) |
|
WCHAR_MIN
(C95)
|
wchar_t
의 유효한 최소값
(매크로 상수) |
|
WCHAR_MAX
(C95)
|
wchar_t
의 유효한 최대값
(매크로 상수) |
시놉시스
#define __STDC_VERSION_WCHAR_H__ 202311L typedef /* 설명 참조 */ wchar_t; typedef /* 설명 참조 */ size_t; typedef /* 설명 참조 */ mbstate_t; typedef /* 설명 참조 */ wint_t; struct tm { /* 설명 참조 */ }; #define MB_UTF16 /* 설명 참조 */ #define MB_UTF32 /* 설명 참조 */ #define MB_UTF8 /* 설명 참조 */ #define NULL /* 설명 참조 */ #define WCHAR_MAX /* 설명 참조 */ #define WCHAR_MIN /* 설명 참조 */ #define WCHAR_UTF16 /* 설명 참조 */ #define WCHAR_UTF32 /* 설명 참조 */ #define WCHAR_UTF8 /* 설명 참조 */ #define WCHAR_WIDTH /* 설명 참조 */ #define WEOF /* 설명 참조 */ int fwprintf(FILE* restrict stream, const wchar_t* restrict format, ...); int fwscanf(FILE* restrict stream, const wchar_t* restrict format, ...); int swprintf(wchar_t* restrict s, size_t n, const wchar_t* restrict format, ...); int swscanf(const wchar_t* restrict s, const wchar_t* restrict format, ...); int vfwprintf(FILE* restrict stream, const wchar_t* restrict format, va_list arg); int vfwscanf(FILE* restrict stream, const wchar_t* restrict format, va_list arg); int vswprintf(wchar_t* restrict s, size_t n, const wchar_t* restrict format, va_list arg); int vswscanf(const wchar_t* restrict s, const wchar_t* restrict format, va_list arg); int vwprintf(const wchar_t* restrict format, va_list arg); int vwscanf(const wchar_t* restrict format, va_list arg); int wprintf(const wchar_t* restrict format, ...); int wscanf(const wchar_t* restrict format, ...); wint_t fgetwc(FILE* stream); wchar_t* fgetws(wchar_t* restrict s, int n, FILE* restrict stream); wint_t fputwc(wchar_t c, FILE* stream); int fputws(const wchar_t* restrict s, FILE* restrict stream); int fwide(FILE* stream, int mode); wint_t getwc(FILE* stream); wint_t getwchar(void); wint_t putwc(wchar_t c, FILE* stream); wint_t putwchar(wchar_t c); wint_t ungetwc(wint_t c, FILE* stream); double wcstod(const wchar_t* restrict nptr, wchar_t** restrict endptr); float wcstof(const wchar_t* restrict nptr, wchar_t** restrict endptr); long double wcstold(const wchar_t* restrict nptr, wchar_t** restrict endptr); long int wcstol(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base); long long int wcstoll(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base); unsigned long int wcstoul(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base); unsigned long long int wcstoull(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base); wchar_t* wcscpy(wchar_t* restrict s1, const wchar_t* restrict s2); wchar_t* wcsncpy(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n); wchar_t* wmemcpy(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n); wchar_t* wmemmove(wchar_t* s1, const wchar_t* s2, size_t n); wchar_t* wcscat(wchar_t* restrict s1, const wchar_t* restrict s2); wchar_t* wcsncat(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n); int wcscmp(const wchar_t* s1, const wchar_t* s2); int wcscoll(const wchar_t* s1, const wchar_t* s2); int wcsncmp(const wchar_t* s1, const wchar_t* s2, size_t n); size_t wcsxfrm(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n); int wmemcmp(const wchar_t* s1, const wchar_t* s2, size_t n); /*QWchar_t*/* wcschr(/*QWchar_t*/* s, wchar_t c); size_t wcscspn(const wchar_t* s1, const wchar_t* s2); /*QWchar_t*/* wcspbrk(/*QWchar_t*/* s1, const wchar_t* s2); /*QWchar_t*/* wcsrchr(/*QWchar_t*/* s, wchar_t c); size_t wcsspn(const wchar_t* s1, const wchar_t* s2); /*QWchar_t*/* wcsstr(/*QWchar_t*/* s1, const wchar_t* s2); wchar_t* wcstok(wchar_t* restrict s1, const wchar_t* restrict s2, wchar_t** restrict ptr); /*QWchar_t*/* wmemchr(/*QWchar_t*/* s, wchar_t c, size_t n); size_t wcslen(const wchar_t* s); size_t wcsnlen(const wchar_t* s, size_t n); wchar_t* wmemset(wchar_t* s, wchar_t c, size_t n); size_t wcsftime(wchar_t* restrict s, size_t maxsize, const wchar_t* restrict format, const struct tm* restrict timeptr); wint_t btowc(int c); int wctob(wint_t c); int mbsinit(const mbstate_t* ps); size_t mbrlen(const char* restrict s, size_t n, mbstate_t* restrict ps); size_t mbrtowc(wchar_t* restrict pwc, const char* restrict s, size_t n, mbstate_t* restrict ps); size_t wcrtomb(char* restrict s, wchar_t wc, mbstate_t* restrict ps); size_t mbsrtowcs(wchar_t* restrict dst, const char** restrict src, size_t len, mbstate_t* restrict ps); size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len, mbstate_t* restrict ps);
구현이 __STDC_IEC_60559_DFP__ 를 정의하는 경우에만:
_Decimal32 wcstod32(const wchar_t* restrict nptr, wchar_t** restrict endptr); _Decimal64 wcstod64(const wchar_t* restrict nptr, wchar_t** restrict endptr); _Decimal128 wcstod128(const wchar_t* restrict nptr, wchar_t** restrict endptr);
구현이 __STDC_IEC_60559_TYPES__ 를 정의하고, 추가로 사용자 코드가 <wchar.h> 를 포함하기 전에 __STDC_WANT_IEC_60559_TYPES_EXT__ 를 정의하는 경우에만:
#ifdef __STDC_WANT_IEC_60559_TYPES_EXT__ /*_FloatN*/ /*wcstofN*/(const wchar_t* restrict nptr, wchar_t** restrict endptr); /*_FloatNx*/ /*wcstofNx*/(const wchar_t* restrict nptr, wchar_t** restrict endptr); /*_DecimalN*/ /*wcstodN*/(const wchar_t* restrict nptr, wchar_t** restrict endptr); /*_DecimalNx*/ /*wcstodNx*/(const wchar_t* restrict nptr, wchar_t** restrict endptr); void /*wcstoencfN*/(unsigned char encptr[restrict static N/8], const wchar_t* restrict nptr, wchar_t** restrict endptr); void /*wcstoencdecdN*/(unsigned char encptr[restrict static N/8], const wchar_t* restrict nptr, wchar_t** restrict endptr); void /*wcstoencbindN*/(unsigned char encptr[restrict static N/8], const wchar_t* restrict nptr, wchar_t** restrict endptr); #endif
및
태그 안의 텍스트는 번역에서 제외되었습니다. 주석(/* ... */)으로 표시된 부분은 함수 이름과 관련된 내용으로, C++ 특정 용어에 해당하므로 번역하지 않았습니다.
구현이 __STDC_LIB_EXT1__ 를 정의하고, 추가적으로 사용자 코드가 __STDC_WANT_LIB_EXT1__ 를 <wchar.h> 를 포함하기 전에 정의한 경우에만:
#ifdef __STDC_WANT_LIB_EXT1__ typedef /* 설명 참조 */ errno_t; typedef /* 설명 참조 */ rsize_t; int fwprintf_s(FILE* restrict stream, const wchar_t* restrict format, ...); int fwscanf_s(FILE* restrict stream, const wchar_t* restrict format, ...); int snwprintf_s(wchar_t* restrict s, rsize_t n, const wchar_t* restrict format, ...); int swprintf_s(wchar_t* restrict s, rsize_t n, const wchar_t* restrict format, ...); int swscanf_s(const wchar_t* restrict s, const wchar_t* restrict format, ...); int vfwprintf_s(FILE* restrict stream, const wchar_t* restrict format, va_list arg); int vfwscanf_s(FILE* restrict stream, const wchar_t* restrict format, va_list arg); int vsnwprintf_s(wchar_t* restrict s, rsize_t n, const wchar_t* restrict format, va_list arg); int vswprintf_s(wchar_t* restrict s, rsize_t n, const wchar_t* restrict format, va_list arg); int vswscanf_s(const wchar_t* restrict s, const wchar_t* restrict format, va_list arg); int vwprintf_s(const wchar_t* restrict format, va_list arg); int vwscanf_s(const wchar_t* restrict format, va_list arg); int wprintf_s(const wchar_t* restrict format, ...); int wscanf_s(const wchar_t* restrict format, ...); errno_t wcscpy_s(wchar_t* restrict s1, rsize_t s1max, const wchar_t* restrict s2); errno_t wcsncpy_s(wchar_t* restrict s1, rsize_t s1max, const wchar_t* restrict s2, rsize_t n); errno_t wmemcpy_s(wchar_t* restrict s1, rsize_t s1max, const wchar_t* restrict s2, rsize_t n); errno_t wmemmove_s(wchar_t* s1, rsize_t s1max, const wchar_t* s2, rsize_t n); errno_t wcscat_s(wchar_t* restrict s1, rsize_t s1max, const wchar_t* restrict s2); errno_t wcsncat_s(wchar_t* restrict s1, rsize_t s1max, const wchar_t* restrict s2, rsize_t n); wchar_t* wcstok_s(wchar_t* restrict s1, rsize_t* restrict s1max, const wchar_t* restrict s2, wchar_t** restrict ptr); size_t wcsnlen_s(const wchar_t* s, size_t maxsize); errno_t wcrtomb_s(size_t* restrict retval, char* restrict s, rsize_t smax, wchar_t wc, mbstate_t* restrict ps); errno_t mbsrtowcs_s(size_t* restrict retval, wchar_t* restrict dst, rsize_t dstmax, const char** restrict src, rsize_t len, mbstate_t* restrict ps); errno_t wcsrtombs_s(size_t* restrict retval, char* restrict dst, rsize_t dstmax, const wchar_t** restrict src, rsize_t len, mbstate_t* restrict ps); #endif