fill

Fills memory with the single byte c.

Param: c = The value to fill memory with. memory = Memory block.

@trusted
void
fill
(
ubyte c = 0
)
(
void[] memory
)

Examples

t
{
    ubyte[9] memory = [1, 2, 3, 4, 5, 6, 7, 8, 9];
    memory.fill!0();
    foreach (ubyte v; memory)
    {
        assert(v == 0);
   

Meta