名前空間
変種
操作

std::btowc

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

 
 
ストリングスライブラリ
NULLで終わる文字列
Original:
Null-terminated strings
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
バイト文字列
文字列をマルチバイト
ワイド文字列
クラス
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string
char_traits
 
NULLで終わるマルチバイト文字列
マルチバイト/ワイドコンバージョン
Original:
Wide/multibyte conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
mbsinit
タイプ
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
mbstate_t
 
Defined in header <cwchar>
std::wint_t btowc( int c );
そのワイド文字を対応するシングルバイト文字cを広げ.
Original:
Widens a single-byte character c to its wide character equivalent.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ほとんどのマルチバイト文字エンコーディングは、ASCII文字セットの文字を表現するために、シングルバイトコードを使用します。この関数は、wchar_tにこのような文字を変換するために使用されるかもしれません.
Original:
Most multibyte character encodings use single-byte codes to represent the characters from the ASCII character set. This function may be used to convert such characters to wchar_t.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目次

[編集] パラメータ

c -
広げるために、シングルバイト文字
Original:
single-byte character to widen
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 値を返します

WEOF if c is EOF.

cのワイド文字表現なら(unsigned char)c初期シフト状態で有効なシングルバイト文字であるか、そうでなければWEOF.
Original:
Wide character representation of c if (unsigned char)c is a valid single-byte character in the initial shift state, WEOF otherwise.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集]

#include <cwchar>
#include <cstdio>
#include <clocale>
 
int main()
{
    std::setlocale(LC_ALL, "");
    std::wprintf(L"wide: %lc\nwidened from narrow: %lc\n", L'a', std::btowc('a'));
}

Output:

wide: a
widened from narrow: a

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

可能であれば、シングルバイト文字に狭いワイド文字が絞り込まれます
Original:
narrows a wide character to a single-byte narrow character, if possible
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(機能) [edit]
[仮想]
charからcharTへの文字または文字列に変換します
Original:
converts a character or characters from char to charT
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(仮想protectedメンバ関数of std::ctype) [edit]
C documentation for btowc