Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 1.17 KB

towlower.md

File metadata and controls

53 lines (39 loc) · 1.17 KB

towlower

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

概要

ワイド文字wcを小文字に変換する。変換は、ロケールのLC_CTYPEカテゴリの影響を受ける。

戻り値

現在のロケールでwcに対応する小文字が定義されていれば、その文字を返す。そうでなければwcをそのまま返す。

例

#include <cwctype>
#include <iostream>

int main()
{
  std::wcout << static_cast<wchar_t>(std::towlower(L'A')) << std::endl;

  // 対応する小文字がない文字は変換されない
  std::wcout << static_cast<wchar_t>(std::towlower(L'1')) << std::endl;
}
  • std::towlower[color ff0000]
  • std::wcout[link /reference/iostream/wcout.md]

出力

a
1

バージョン

言語

  • C++98

関連項目

  • tolower : 1バイト文字に対する同じ変換
  • towupper : 逆方向の変換
  • towctrans : 変換規則を実行時に指定して変換する