名前空間
変種
操作

c16rtomb

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

Defined in header <uchar.h>
size_t c16rtomb( char* s, char16_t c16, mbstate_t* ps );
(C11およびそれ以降)
マルチバイト文字を狭めるために、16ビットのワイド文字を変換.
Original:
Converts a 16-bit wide character to narrow multibyte 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ポインタでない場合、この関数はc16(任意のシフトシーケンスを含む)のマルチバイト文字表現を格納するのに必要なバイト数を決定し、その最初の要素sによって指された文字配列にマルチバイト文字表現を格納します。最もMB_CUR_MAXバイトに、この関数によって記述することができ.
Original:
If s is not a null pointer, the function determines the number of bytes necessary to store the multibyte character representation of c16 (including any shift sequences), and stores the multibyte character representation in the character array whose first element is pointed to by s. At most MB_CUR_MAX bytes can be written by this function.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
sがNULLポインターである場合、コールは、いくつかの内部バッファc16rtomb(buf, u'\0', ps)ためbufと同等です.
Original:
If s is a null pointer, the call is equivalent to c16rtomb(buf, u'\0', ps) for some internal buffer buf.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
C16の場合は初期シフト状態と変換状態パラメータu'\0'を回復させるために必要なシフトシーケンスによって先行nullワイド文字*ps、NULLバイトが格納されているが、初期シフト状態を表すために更新され.
Original:
If c16 is the null wide character u'\0', a null byte is stored, preceded by any shift sequence necessary to restore the initial shift state and the conversion state parameter *ps is updated to represent 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.
マクロ__STDC_UTF_16__が定義されている場合、この関数によって使用される16ビットのエンコーディングはUTF-16、それ以外の場合は、実装定義である。いずれにしても、この関数で使用されるマルチバイトエンコーディングは、現在アクティブなCロケールで指定されている.
Original:
If the macro __STDC_UTF_16__ is defined, the 16-bit encoding used by this function is UTF-16, otherwise it is implementation-defined. In any case, the multibyte encoding used by this function is specified by the currently active C locale.
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 narrow character array where the multibyte character will be stored
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
c16 -
変換する16ビットの文字
Original:
the 16-bit character to convert
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 object 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.

[編集] 値を返します

成功した場合、最初の要素がsによって指された文字配列に書き込まれたバイト数を(任意のシフトシーケンスを含む)を返します。この値は0、例えばかもしれないサロゲートペアの最初のchar16_tを処理するとき.
Original:
On success, returns the number of bytes (including any shift sequences) written to the character array whose first element is pointed to by s. This value may be 0, e.g. when processing the first char16_t in a surrogate pair.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
障害(c16有効な16ビット文字でない場合)、返品-1EILSEQの店舗errno、および詳細不明の状態で*psを葉の上に.
Original:
On failure (if c16 is not a valid 16-bit character), returns -1, stores EILSEQ in errno, and leaves *ps in unspecified state.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

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

ナローマルチバイト文字列から次の16ビットのワイド文字を生成します
Original:
generate the next 16-bit wide character from a narrow multibyte string
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 c16rtomb