From std.mem.set to @memset.

This commit is contained in:
Philippe Pittoli 2023-05-24 01:33:11 +02:00
parent 9d4f5b3cab
commit a43c8bd6d3

View File

@ -6,7 +6,7 @@ pub fn hexdump(stream: anytype, header: []const u8, buffer: []const u8) std.os.W
var hdr: [64]u8 = undefined;
var offset: usize = (hdr.len / 2) - ((header.len / 2) - 1);
std.mem.set(u8, hdr[0..hdr.len], ' ');
@memset(hdr[0..hdr.len], ' ');
std.mem.copy(u8, hdr[offset..hdr.len], header);
try stream.writeAll(hdr[0..hdr.len]);