Skip to content

a small library with little helpers for String handling

License

Notifications You must be signed in to change notification settings

SuSonicTH/zigStringUtil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zigStringUtil

a small library with little helpers for String handling.

Builder

can be used to concatinate strings together

Joiner

simmilar to Builder used to concatenate strings but it can add a prefix, suffix and insert delimiter

zig module

To use this as a module in you project create a build.zig.zon file, adding zigStringUtil as dependency.

The url and hash are from the current master version, tested with zig 0.11.0

.{ 
    .name = "myProject", 
    .version = "0.0.1", 
    .dependencies = .{ 
        .zigStringUtil = .{
            .url = "https://github.com/SuSonicTH/zigStringUtil/archive/66577eecdd273b626fe59b6d46b3349331fda632.tar.gz",
            .hash = "1220024750ad8df560a590919c57725eda68f68f7756d443aa32a3a8be8ee21905a9",
        } 
    } 
}

and in your build.zig add the module as dependecy

const zigStringUtil = b.dependency("zigStringUtil", .{
    .target = target,
    .optimize = optimize,
});

and add it as a module to your exe/lib

//sample exe
const exe = b.addExecutable(.{
    .name = "zli",
    .root_source_file = .{ .path = "src/main.zig" },
    .target = target,
    .optimize = optimize,
});

//add module
exe.addModule("zigStringUtil", zigStringUtil.module("zigStringUtil"));

About

a small library with little helpers for String handling

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages