Created
April 8, 2019 10:11
-
-
Save ljmccarthy/c373ee08c8f08d0e888ab263241c80bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
pub fn main() !void { | |
const stdout = try std.io.getStdOut(); | |
var direct_allocator = std.heap.DirectAllocator.init(); | |
defer direct_allocator.deinit(); | |
var arena = std.heap.ArenaAllocator.init(&direct_allocator.allocator); | |
defer arena.deinit(); | |
var argsIter = std.os.args(); | |
_ = argsIter.skip(); | |
while (true) { | |
var arg = try (argsIter.next(&arena.allocator) orelse break); | |
try stdout.write(arg); | |
try stdout.write("\n"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment