Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 1.18 KB

File metadata and controls

59 lines (42 loc) · 1.18 KB

wcslen

  • cwchar[meta header]
  • std[meta namespace]
  • function[meta id-type]
namespace std {
  size_t wcslen(const wchar_t* s);
}
  • size_t[link /reference/cstddef/size_t.md]

概要

ワイド文字列の長さを取得する。

効果

sが指す文字列の長さを求める。

戻り値

sが指す文字列の、終端のヌル文字より前にある文字の個数を返す。

備考

  • この関数は、C++26からフリースタンディング処理系でも使用できる

例

#include <cwchar>
#include <iostream>

int main()
{
  std::wcout << std::wcslen(L"hello") << std::endl;
}
  • std::wcslen[color ff0000]
  • std::wcout[link /reference/iostream/wcout.md]

出力

5

バージョン

言語

  • C++98

関連項目

参照