toBigEndian

convert a integral type T[] into an array of bytes.

  1. void toBigEndian(in T val, ubyte[] output)
  2. void toBigEndian(in T[] ns, ubyte[] output)
    @safe @nogc
    void
    toBigEndian
    (
    T
    )
    (
    in T[] ns
    ,
    ubyte[] output
    )
    if (
    isIntegral!T
    )
    in { assert (output.length >= T.sizeof * ns.length, "output buffer too small"); }

Parameters

ns
Type: T[]

the numbers

output
Type: ubyte[]

the buffer to write the bytes to

Meta