namespace std {
wchar_t* wcscat(wchar_t* s1, const wchar_t* s2);
}
概要
ワイド文字列を連結する。
効果
s1が指す文字列の末尾へ、s2が指す文字列を終端のヌル文字を含めて連結する。
戻り値
s1を返す。
備考
- 連結先の領域は、連結後の文字列全体を格納できる大きさでなければならない
- 2つの領域が重なっている場合、動作は未定義である
- この関数は、C++26からフリースタンディング処理系でも使用できる
例
#include <cwchar>
#include <iostream>
int main()
{
wchar_t buffer[16] = L"hello";
std::wcscat(buffer, L" world");
std::wcout << buffer << std::endl;
}
出力
hello world
バージョン
言語
- C++98
関連項目
wcsncat: 文字数を指定して連結するstd::strcat(): マルチバイト文字列版
参照
- P2338R4 Freestanding Library: Character primitives and the C library
- C++26で、この関数がフリースタンディング処理系で使用可能になった