Zig
Zig
Example: Http.GetUrlPath method
Demonstrates theGetUrlPath method.
Chilkat Zig Downloads
const std = @import("std");
const chilkat = @import("chilkat");
pub fn main(init: std.process.Init) !void {
const alloc = init.arena.allocator();
const http = try chilkat.Http.init();
defer http.deinit();
const url = "https://example.com/folder/page?lang=en&sort=asc#section2";
std.debug.print("{s}\n", .{try http.getUrlPath(alloc, url)});
// Output:
// /folder/page
}