std::wcscat
Defined in header <cwchar> | | |
|---|---|---|
wchar_t *wcscat( wchar_t *dest, const wchar_t *src ); | | |
将所指向的宽字符串的副本附加到src指向宽字符串的末尾dest.宽性src[0]的末尾替换空终止符。dest产生的宽字符串为空终止。
如果目标数组不足以满足两个目标数组的内容,则该行为是未定义的。str和dest以及终止空宽字符。
如果字符串重叠,则行为未定义。
参数
dest | - | pointer to the null-terminated wide string to append to |
|---|---|---|
src | - | pointer to the null-terminated wide string to copy from |
返回值
返回dest...
例
二次
#include <iostream>
#include <cwchar>
#include <clocale>
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';
}二次
可能的产出:
二次
Земля, прощай. В добрый путь.二次
另见
wcsncat | appends a certain amount of wide characters from one wide string to another (function) |
|---|---|
strcat | concatenates two strings (function) |
wcscpy | copies one wide string to another (function) |
C.wcscat文件
© cppreference.com在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

