Skip to content

Instantly share code, notes, and snippets.

@ikouchiha47
Created July 7, 2024 19:55
Show Gist options
  • Save ikouchiha47/0d99e32449c3522d86c5a8410febb364 to your computer and use it in GitHub Desktop.
Save ikouchiha47/0d99e32449c3522d86c5a8410febb364 to your computer and use it in GitHub Desktop.
zig, add println to std.debug
// file present in std/debug.zig
pub fn println(comptime fmt: []const u8, args: anytype) void {
lockStdErr();
defer unlockStdErr();
const stderr = io.getStdErr().writer();
nosuspend stderr.print(fmt ++ "\n", args) catch return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment