7 lines
181 B
Zig
7 lines
181 B
Zig
const std = @import("std");
|
|
|
|
pub fn getUsername(allocator: std.mem.Allocator) ![]u8 {
|
|
const username = try std.process.getEnvVarOwned(allocator, "USER");
|
|
return username;
|
|
}
|