{"id":13344055,"url":"https://github.com/Hejsil/fmtbuf","last_synced_at":"2025-03-12T06:31:08.904Z","repository":{"id":109697234,"uuid":"607734261","full_name":"Hejsil/fmtbuf","owner":"Hejsil","description":"Buffered formatting that figures out the buffer size for you","archived":true,"fork":false,"pushed_at":"2023-04-14T07:15:10.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-20T17:41:36.497Z","etag":null,"topics":["buffer","formatting","zig","zig-lib","zig-library","zig-package"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hejsil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["Hejsil"]}},"created_at":"2023-02-28T15:15:55.000Z","updated_at":"2024-09-13T12:23:30.000Z","dependencies_parsed_at":"2023-07-29T16:01:47.720Z","dependency_job_id":null,"html_url":"https://github.com/Hejsil/fmtbuf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hejsil%2Ffmtbuf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hejsil%2Ffmtbuf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hejsil%2Ffmtbuf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hejsil%2Ffmtbuf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hejsil","download_url":"https://codeload.github.com/Hejsil/fmtbuf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243171618,"owners_count":20247877,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buffer","formatting","zig","zig-lib","zig-library","zig-package"],"created_at":"2024-07-29T19:32:19.947Z","updated_at":"2025-03-12T06:31:08.892Z","avatar_url":"https://github.com/Hejsil.png","language":"Zig","readme":"\u003c!---\nREADME.md is autogenerated. Please edit example/README.md.template instead.\n--\u003e\n# fmtbuf\n\nAn alternative to `std.fmt.bufPrintZ` which can:\n\n* Automatically figure out the buffer size at compile time\n* Can be partially formatted, allowing for a prefix to be formatted and reused.\n\n```zig\nconst FmtBuf = @import(\"fmtbuf\").FmtBuf;\nconst std = @import(\"std\");\n\ntest {\n    var buf = FmtBuf(\"[{}] = {}\", std.meta.Tuple(\u0026.{ usize, u8 })){};\n    try std.testing.expectEqualStrings(\"[0] = 0\", buf.format(.{ 0, 0 }));\n    try std.testing.expectEqualStrings(\"[12] = 3\", buf.format(.{ 12, 3 }));\n\n    var partial = buf.partialFormat(1, .{500});\n    try std.testing.expectEqualStrings(\"[500] = 0\", partial.format(.{0}));\n    try std.testing.expectEqualStrings(\"[500] = 1\", partial.format(.{1}));\n    try std.testing.expectEqualStrings(\"[500] = 2\", partial.format(.{2}));\n}\n\n```\n\n","funding_links":["https://github.com/sponsors/Hejsil"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHejsil%2Ffmtbuf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHejsil%2Ffmtbuf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHejsil%2Ffmtbuf/lists"}