Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 996 Bytes

iswprint.md

File metadata and controls

50 lines (37 loc) · 996 Bytes

iswprint

  • cwctype[meta header]
  • std[meta namespace]
  • function[meta id-type]
namespace std {
  int iswprint(wint_t wc);
}
  • wint_t[link /reference/cwchar/wint_t.md]

概要

ワイド文字wcが表示文字であるかを判定する。判定は、ロケールのLC_CTYPEカテゴリの影響を受ける。

戻り値

wcが表示文字であると判定されれば非ゼロの値を、そうでなければ0を返す。

例

#include <cwctype>
#include <iostream>

int main()
{
  std::cout << std::boolalpha;
  std::cout << (std::iswprint(L'a') != 0) << std::endl;
  std::cout << (std::iswprint(L'\n') != 0) << std::endl;
}
  • std::iswprint[color ff0000]

出力

true
false

バージョン

言語

  • C++98

関連項目

  • isprint : 1バイト文字に対する同じ判定
  • iswctype : 種別を実行時に指定して判定する