名前空間
変種
操作

mbrtowc

提供: cppreference.com
< c‎ | string‎ | multibyte

Defined in header <wchar.h>
size_t mbrtowc( wchar_t* pwc, const char* s, size_t n, mbstate_t* ps );
ワイド文字に狭いマルチバイト文字に変換し.
Original:
Converts a narrow multibyte character to a wide character.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
sがNULLポインタでない場合は、次のマルチバイト文字(任意のシフトシーケンスを含む)を完了するのに必要なバイト数を決定するためにnが指すバイトから始めて、マルチバイト文字列の中で最もsバイトを検査します。関数はsで次のマルチバイト文字が完全かつ有効であると判断した場合、対応するワイド文字に変換して*pwcに格納(pwcnullでない場合).
Original:
If s is not a null pointer, inspects at most n bytes of the multibyte character string, beginning with the byte pointed to by s to determine the number of bytes necessary to complete the next multibyte character (including any shift sequences). If the function determines that the next multibyte character in s is complete and valid, converts it to the corresponding wide character and stores it in *pwc (if pwc is not null).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
sがNULLポインターである場合、値はnpwc無視され、コールがmbrtowc(NULL, "", 1, ps)と同等です.
Original:
If s is a null pointer, the values of n and pwc are ignored and call is equivalent to mbrtowc(NULL, "", 1, ps).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
生産ワイド文字がヌル文字である場合、*psに格納されている変換状態は初期シフト状態です.
Original:
If the wide character produced is the null character, the conversion state stored in *ps is the initial shift state.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目次

[編集] パラメータ

pwc -
結果のワイド文字が書き込まれる場所へのポインタ
Original:
pointer to the location where the resulting wide character will be written
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
s -
入力として使用されるマルチバイト文字列へのポインタ
Original:
pointer to the multibyte character string used as input
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
n -
調べることができますsのバイト数を制限しません
Original:
limit on the number of bytes in s that can be examined
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ps -
マルチバイト文字列を解釈する際に使用される変換状態へのポインタ
Original:
pointer to the conversion state used when interpreting the multibyte string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 値を返します

:適用される次の最初
Original:
The first of the following that applies:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • 0ヌル文字であった文字はsから変換(null以外の場合とpwcに格納されている)場合
    Original:
    0 if the character converted from s (and stored in pwc if non-null) was the null character
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • バイト数[1...n]首尾sから変換されたマルチバイト文字の
    Original:
    the number of bytes [1...n] of the multibyte character successfully converted from s
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (size_t)-2次回nバイトが不完全だが、今のところ有効なマルチバイト文字で構成されている場合。何も*pwcに書き込まれません.
    Original:
    (size_t)-2 if the next n bytes constitute an incomplete, but so far valid, multibyte character. Nothing is written to *pwc.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (size_t)-1符号化エラーが発生した場合。何も*pwcに書き込まれません、値EILSEQerrnoに格納されており、*psの値は不特定のままにされ.
    Original:
    (size_t)-1 if encoding error occurs. Nothing is written to *pwc, the value EILSEQ is stored in errno and the value of *ps is left unspecified.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

[編集]

[編集] も参照してください

ワイド文字に次のマルチバイト文字に変換します
Original:
converts the next multibyte character to wide character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(機能) [edit]
そのマルチバイト表現、所定の状態にワイド文字に変換します
Original:
converts a wide character to its multibyte representation, given state
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(機能) [edit]
C++ documentation for mbrtowc