std:: wcscat
From cppreference.net
C++
Text processing library
| Localization library | |||||||||||||||||||||||||
| Regular expressions library (C++11) | |||||||||||||||||||||||||
| Formatting library (C++20) | |||||||||||||||||||||||||
| Null-terminated sequence utilities | |||||||||||||||||||||||||
| Byte strings | |||||||||||||||||||||||||
| Multibyte strings | |||||||||||||||||||||||||
| Wide strings | |||||||||||||||||||||||||
| Primitive numeric conversions | |||||||||||||||||||||||||
|
|||||||||||||||||||||||||
| Text encoding identifications | |||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Null-terminated wide strings
| Functions | ||||||||||||||||||||||||||
| Character classification | ||||||||||||||||||||||||||
| Character manipulation | ||||||||||||||||||||||||||
| Conversions to numeric formats | ||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||
| String manipulation | ||||||||||||||||||||||||||
| String examination | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| Array manipulation | ||||||||||||||||||||||||||
|
ヘッダーで定義
<cwchar>
|
||
|
wchar_t
*
wcscat
(
wchar_t
*
dest,
const
wchar_t
*
src
)
;
|
||
src が指すワイド文字列のコピーを、 dest が指すワイド文字列の末尾に追加します。ワイド文字 src [ 0 ] は、 dest の末尾にあるナルターミネータを置き換えます。結果のワイド文字列はナルターミネートされます。
宛先配列が src と dest および終端ナルワイド文字の内容を格納するのに十分な大きさでない場合、動作は未定義です。
文字列が重なっている場合の動作は未定義です。
目次 |
パラメータ
| dest | - | 追加先のヌル終端ワイド文字列へのポインタ |
| src | - | コピー元のヌル終端ワイド文字列へのポインタ |
戻り値
dest のコピーを返します。
例
このコードを実行
#include <clocale> #include <cwchar> #include <iostream> int main(void) { wchar_t str[50] = L"Земля, прощай."; std::wcscat(str, L" "); std::wcscat(str, L"В добрый путь."); std::setlocale(LC_ALL, "en_US.utf8"); std::wcout.imbue(std::locale("en_US.utf8")); std::wcout << str << '\n'; }
出力例:
Земля, прощай. В добрый путь.
関連項目
|
あるワイド文字列から別のワイド文字列へ、指定された数のワイド文字を追加する
(関数) |
|
|
2つの文字列を連結する
(関数) |
|
|
あるワイド文字列を別のワイド文字列にコピーする
(関数) |
|
|
Cドキュメント
for
wcscat
|
|