Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

query_begin

Resizes the query string to be the correct length; returns the pointer to the query string.

main.query_begin
export fn query_begin(query_string_len: usize) [*]u8

File

lib/docs/wasm/main.zig:77

Code

export fn query_begin(query_string_len: usize) [*]u8 {
    query_string.resize(gpa, query_string_len) catch @panic("OOM");
    return query_string.items.ptr;
}