This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.
If I told you that the following prints 1665 : var b: std.ArrayList(u8) = try .initCapacity(init.gpa, 1024); try b.appendSlice(init.gpa, "a" ** 1025); std.debug.print("{d} n", .{b.capacity}); Would you be able to guess what this prints? var w: Io.Writer.Allocating = try .initCapacity(init.gpa, 1024); try w.writer.writeAll("a" ** 1025); std.debug.print("{d} n", .{w.writer.buffer.len}); Like me, you…
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.