https://github.com/susonicth/zigstringutil
a small library with little helpers for String handling
https://github.com/susonicth/zigstringutil
library string utility zig
Last synced: 3 months ago
JSON representation
a small library with little helpers for String handling
- Host: GitHub
- URL: https://github.com/susonicth/zigstringutil
- Owner: SuSonicTH
- License: mit
- Created: 2023-08-04T21:56:52.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-08-14T21:16:40.000Z (almost 2 years ago)
- Last Synced: 2025-02-24T14:56:30.557Z (3 months ago)
- Topics: library, string, utility, zig
- Language: Zig
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# 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
```zig
.{
.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
```zig
const zigStringUtil = b.dependency("zigStringUtil", .{
.target = target,
.optimize = optimize,
});
```and add it as a module to your exe/lib
```zig
//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"));
```