Sample code for 30+ languages & platforms
Zig

StringBuilder GetBetween

Demonstrates the GetBetween method.

Chilkat Zig Downloads

Zig
const std = @import("std");
const chilkat = @import("chilkat");

pub fn main(init: std.process.Init) !void {
    const alloc = init.arena.allocator();

    const sb = try chilkat.StringBuilder.init();
    defer sb.deinit();
    sb.append("<company><name>Chilkat Software</name></company>") catch {};

    // For example, to get the company name in the string above...
    const company_name = try sb.getBetween(alloc, "<name>", "</name>");
    std.debug.print("Company Name = {s}\n", .{company_name});
}