Jafagervik/zstb
Zig Standard Library Extension
To install, run:
zig fetch --save git+https://github.com/Jafagervik/zstb#{version}
Where {version} is the release version you want to use; e.g 0.1.7:
zig fetch --save git+https://github.com/Jafagervik/zstb#v0.1.7
In your build.zig
file: add like this:
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const zstb_dep = b.dependency("zstb", .{});
const zstb = zstb_dep.module("zstb");
const exe_mod = b.createModule(.{
.root_source_file = b.path("path/to/your/main/source/file"),
.target = target,
.optimize = optimize,
});
exe_mod.addImport("zstb", zstb);
Then, to use it, include it in a file like such:
const zstb = @import("zstb");
const a = "a";
const b = "b";
const isSame = zstb.strings.eql("a", "b");
std.debug.print("{any}\n", .{isSame});
See examples/
for example setup
Now for char operations
[]const u8