copy

Copies source into target.

source and target shall not overlap so that source points ahead of target.

target shall have enough space for source.length elements.

@nogc nothrow pure @trusted
void
copy
(
const void[] source
,
void[] target
)

Parameters

source void[]

Memory to copy from.

target void[]

Destination memory.

Examples

t
{
    ubyte[9] source = [1, 2, 3, 4, 5, 6, 7, 8, 9];
    ubyte[9] target;
    source.copy(target);
    assert(equal(source, target)

See Also

$(D_PSYMBOL copyBackward).

Precondition: source.length <= target.length.

Meta