Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goto-bus-stop/ziguid
GUID parsing/stringifying with zig
https://github.com/goto-bus-stop/ziguid
guid zig
Last synced: 3 months ago
JSON representation
GUID parsing/stringifying with zig
- Host: GitHub
- URL: https://github.com/goto-bus-stop/ziguid
- Owner: goto-bus-stop
- License: other
- Created: 2019-06-25T11:59:15.000Z (over 5 years ago)
- Default Branch: default
- Last Pushed: 2023-06-25T16:04:06.000Z (over 1 year ago)
- Last Synced: 2024-10-05T16:26:21.292Z (4 months ago)
- Topics: guid, zig
- Language: Zig
- Size: 40 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-zig - goto-bus-stop/ziguid
- awesome-zig - ziguid🗒️GUID parsing/stringifying with zig
README
# ziguid
GUIDs for zig.## Usage
```zig
const guid = @import("ziguid");
const GUID = guid.GUID;const at_comptime = GUID.from("14aacebd-2dfe-4f5c-a475-d1b57b0cb775");
const generate_at_runtime = GUID.v4();
var string_buffer = [_]u8{0} ** 38;
generate_at_runtime.toString(string_buffer, .Braced, .Upper);
// "{B10BC49E-E79A-478B-B180-0A7093E2D1BE}"
```The GUID struct is 16 bytes large and has an identical layout to the GUID struct in the Windows C API.
## License
[Apache-2.0](./LICENSE.md)