to

Converts an integral number to a static or dynamic array of ubyte.

  1. A to(N x)
    A
    to
    (
    A
    N
    )
    (
    N x
    )
    if (
    isByteArray!(N, A) &&
    isIntegral!N
    )
  2. N to(A arr)

Examples

int num = 10;
ubyte[4] bytes = num.to!( ubyte[4] );

Meta

Authors

Tony J. Hudgins