Skip to content

Latest commit

 

History

History
53 lines (38 loc) · 976 Bytes

btowc.md

File metadata and controls

53 lines (38 loc) · 976 Bytes

btowc

  • cwchar[meta header]
  • std[meta namespace]
  • function[meta id-type]
namespace std {
  wint_t btowc(int c);
}
  • wint_t[link wint_t.md]

概要

1バイト文字を、ワイド文字へ変換する。

効果

cが初期変換状態における1バイトのマルチバイト文字として有効であれば、対応するワイド文字へ変換する。

戻り値

変換できた場合はそのワイド文字をwint_t型で返す。cがEOFである場合、または有効な1バイト文字でない場合はWEOFを返す。

例

#include <cwchar>
#include <iostream>

int main()
{
  std::wcout << (std::btowc('a') == L'a') << std::endl;
  std::wcout << (std::btowc(EOF) == WEOF) << std::endl;
}
  • std::btowc[color ff0000]
  • std::wcout[link /reference/iostream/wcout.md]

出力

1
1

バージョン

言語

  • C++98

関連項目

  • wctob: 逆方向の変換