put16

Converts short value into bytes and appends it to the managed array.

Appender!(ubyte[])
put16
(
Appender!(ubyte[]) app
,
in int value
)

Examples

auto app = appender!(ubyte[]);
app.put16(42);
app.put16(1964);
app.put16(2018);
app.put16(1971);
assert(app.data.length == 8);
assert(app.data == [0x00, 0x2a, 0x07, 0xac, 0x07, 0xe2, 0x07, 0xb3]);

Meta