名稱空間
變體
操作

std::char_traits<char>::copy, std::char_traits<wchar_t>::copy, std::char_traits<char8_t>::copy, std::char_traits<char16_t>::copy, std::char_traits<char32_t>::copy

來自 cppreference.com
< cpp‎ | string‎ | char traits
static char_type*
    copy( char_type* dest, const char_type* src, std::size_t count );
(C++20 起為 constexpr)

src 指向的字串中的 count 個字元複製到 dest 指向的字串中。

如果 [destdest + count)[srcsrc + count) 重疊,則行為未定義。

有關 X::copy 的字元特性的一般要求,請參閱 CharTraits

目錄

[編輯] 引數

dest - 指向要複製到的字串的指標
src - 指向要從中複製的字串的指標
count - 要複製的字元數

[編輯] 返回值

dest

[編輯] 異常

不丟擲任何異常。

[編輯] 複雜度

關於 count 的線性複雜度。

[編輯] 參閱

[靜態]
賦值字元
(public static member function) [編輯]