pub fn printArray(
w: *Writer,
comptime fmt: []const u8,
options: std.fmt.Options,
ptr_to_array: anytype,
max_depth: usize,
) Error!void WriteFailedSee the Writer implementation for detailed diagnostics.
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604pub fn printArray(
w: *Writer,
comptime fmt: []const u8,
options: std.fmt.Options,
ptr_to_array: anytype,
max_depth: usize,
) Error!void {
if (max_depth == 0) return w.writeAll("{ ... }");
try w.writeAll("{ ");
for (ptr_to_array, 0..) |elem, i| {
try w.printValue(fmt, options, elem, max_depth - 1);
if (i < ptr_to_array.len - 1) {
try w.writeAll(", ");
}
}
try w.writeAll(" }");
}