aboutsummaryrefslogtreecommitdiff
path: root/lib/std/io
diff options
context:
space:
mode:
authorryuukk <44361234+ryuukk@users.noreply.github.com>2020-10-14 18:38:59 +0200
committerAndrew Kelley <andrew@ziglang.org>2021-01-02 17:12:57 -0700
commit1d97747665b993eb0c625c8d0a28e2d0c8e167a3 (patch)
tree39704246d55eb124bf02b80a7df696f962bce22c /lib/std/io
parentdb1e97d4b19d8399252e0fbc85fc3563b005a892 (diff)
downloadzig-1d97747665b993eb0c625c8d0a28e2d0c8e167a3.tar.gz
zig-1d97747665b993eb0c625c8d0a28e2d0c8e167a3.zip
Pretty print Slices
This code is adapted from pixelherodev paste from IRC I have added a new fmt option to handle printing slice values ``{v}`` or ``{V}`` While i think it can be made the default, i want your opinion about it ```zig var slicea = [0]u32{}; var sliceb = [3]u32{ 1, 2, 3 }; std.log.info("Content: {v}", .{slicea}); std.log.info("Content: {v}", .{sliceb}); ``` will print: ``` info: Content: [] info: Content: [1, 2, 3] ``` Question: Should we drop ``{v}`` and make it the default behavior?
Diffstat (limited to 'lib/std/io')
0 files changed, 0 insertions, 0 deletions