std.process.Args
The entries of std.process.Args in the Zig reference. This page has 37 cards.
pub fn iterate(a: Args) Iterator
Holds the command-line arguments, with the program name as the first entry.
- Kind
- function
- Module
std.process.Args
pub fn iterateAllocator(a: Args, gpa: Allocator) Iterator.InitError!Iterator
You must deinitialize iterator's internal buffers by calling `deinit` when done.
- Kind
- function
- Module
std.process.Args
Cross-platform access to command line one argument at a time.
- Kind
- struct
- Module
std.process.Args
pub fn deinit(it: *Iterator) void
Required to release resources if the iterator was initialized with `initAllocator` function.
- Kind
- function
- Module
std.process.Args
pub fn init(a: Args) Iterator
Initialize the args iterator.
- Kind
- function
- Module
std.process.Args
pub fn initAllocator(a: Args, gpa: Allocator) InitError!Iterator
You must deinitialize iterator's internal buffers by calling `deinit` when done.
- Kind
- function
- Module
std.process.Args
- Kind
- type
- Module
std.process.Args
pub fn next(it: *Iterator) ?[:0]const u8
Return subsequent argument, or `null` if no more remaining.
- Kind
- function
- Module
std.process.Args
- Kind
- struct
- Module
std.process.Args
pub fn init(a: Args) Posix
- Kind
- function
- Module
std.process.Args
- Kind
- error set
- Module
std.process.Args
pub fn next(it: *Posix) ?[:0]const u8
- Kind
- function
- Module
std.process.Args
pub fn skip(it: *Posix) bool
- Kind
- function
- Module
std.process.Args
pub fn skip(it: *Iterator) bool
Parse past 1 argument without capturing it.
- Kind
- function
- Module
std.process.Args
- Kind
- struct
- Module
std.process.Args
pub fn deinit(self: *Wasi) void
Call to free the internal buffer of the iterator.
- Kind
- function
- Module
std.process.Args
pub fn init(allocator: Allocator) Wasi.InitError!Wasi
You must call deinit to free the internal buffer of the iterator after you are done.
- Kind
- function
- Module
std.process.Args
- Kind
- error set
- Module
std.process.Args
pub fn next(self: *Wasi) ?[:0]const u8
- Kind
- function
- Module
std.process.Args
pub fn skip(self: *Wasi) bool
- Kind
- function
- Module
std.process.Args
Iterator that implements the Windows command-line parsing algorithm.
- Kind
- struct
- Module
std.process.Args
pub fn deinit(self: *Windows) void
Frees the iterator's copy of the command-line string and all previously returned argument slices.
- Kind
- function
- Module
std.process.Args
pub fn init(gpa: Allocator, cmd_line_w: []const u16) Windows.InitError!Windows
`cmd_line_w` *must* be a WTF16-LE-encoded string.
- Kind
- function
- Module
std.process.Args
- Kind
- error set
- Module
std.process.Args
pub fn next(self: *Windows) ?[:0]const u8
Returns the next argument and advances the iterator.
- Kind
- function
- Module
std.process.Args
pub fn skip(self: *Windows) bool
Skips the next argument and advances the iterator.
- Kind
- function
- Module
std.process.Args
pub fn IteratorGeneral(comptime options: IteratorGeneralOptions) type
A general Iterator to parse a string into a set of arguments.
- Kind
- type function
- Module
std.process.Args
pub fn deinit(self: *Self) void
Call to free the internal buffer of the iterator.
- Kind
- function
- Module
std.process.Args
pub fn init(allocator: Allocator, cmd_line_utf8: []const u8) InitError!Self
cmd_line_utf8 MUST remain valid and constant while using this instance.
- Kind
- function
- Module
std.process.Args
- Kind
- error set
- Module
std.process.Args
pub fn initTakeOwnership(allocator: Allocator, cmd_line_utf8: []const u8) InitError!Self
cmd_line_utf8 will be free'd (with the allocator) on deinit().
- Kind
- function
- Module
std.process.Args
pub fn next(self: *Self) ?[:0]const u8
Returns a slice of the internal buffer that contains the next argument.
- Kind
- function
- Module
std.process.Args
pub fn skip(self: *Self) bool
- Kind
- function
- Module
std.process.Args
Optional parameters for `IteratorGeneral`.
- Kind
- struct
- Module
std.process.Args
pub fn toSlice(a: Args, arena: Allocator) ToSliceError![]const [:0]const u8
Returned value may reference several allocations and may point into `a`.
- Kind
- function
- Module
std.process.Args
- Kind
- type
- Module
std.process.Args
On WASI without libc, this is `void` because the environment has to be queried and heap-allocated at runtime.
- Kind
- type
- Module
std.process.Args