名前空間
変種
操作

std::char_traits<CharT>::copy

提供: cppreference.com
< cpp‎ | string‎ | char traits
static char_type* copy( char_type* dest, const char_type* src, std::size_t count );
(C++20未満)
static constexpr char_type* copy( char_type* dest, const char_type* src, std::size_t count );
(C++20以上)

src の指す文字列から dest の指す文字列に count 個の文字をコピーします。

形式的には、 [0, count) 内のそれぞれの i について、 assign(src[i], dest[i]) を行います。

コピーされる文字の範囲がオーバーラップしている、つまり src が [dest, dest + count) 内の場合、動作は未定義です。

目次

[編集] 引数

dest - コピー先の文字列を指すポインタ
src - コピー元の文字列を指すポインタ
count - コピーする文字数

[編集] 戻り値

dest

[編集] 例外

(なし)

[編集] 計算量

線形。

[編集] 関連項目

[静的]
文字を代入します
(パブリック静的メンバ関数) [edit]