The OpenD Programming Language

ionPut

Examples

ubyte[20] data;

ubyte[] result = [0x85, 'v', 'a', 'l', 'u', 'e'];
auto str = "value";
assert(data[0 .. ionPut(data.ptr, str)] == result);

result = [ubyte(0x8E), ubyte(0x90)] ~ cast(ubyte[])"hexadecimal23456";
str = "hexadecimal23456";
assert(data[0 .. ionPut(data.ptr, str)] == result);

Meta