The OpenD Programming Language

printArray

Prints array

pragma(inline, false)
void
printArray
(
C = char
W
T
)
(
scope ref W w
,
scope const(T)[] c
,
scope const(C)[] lb = "["
,
scope const(C)[] rb = "]"
,
scope const(C)[] sep = ", "
)

Examples

import mir.appender: scopedBuffer;
auto w = scopedBuffer!char;
string[2] array = ["a\na", "b"];
w.print(array[]);
assert(w.data == `["a\na", "b"]`);

Meta