{"id":21071602,"url":"https://github.com/esrrhs/printf_vector","last_synced_at":"2025-03-14T02:48:06.778Z","repository":{"id":152862843,"uuid":"627233678","full_name":"esrrhs/printf_vector","owner":"esrrhs","description":"like libc printf, but can use vector input ","archived":false,"fork":false,"pushed_at":"2023-04-14T08:08:20.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T22:11:10.890Z","etag":null,"topics":["printf","vector"],"latest_commit_sha":null,"homepage":"","language":"C++","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/esrrhs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2023-04-13T03:44:10.000Z","updated_at":"2023-04-13T15:33:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa6e5418-f25e-4d65-96ab-d7abba9b838a","html_url":"https://github.com/esrrhs/printf_vector","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/esrrhs%2Fprintf_vector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esrrhs%2Fprintf_vector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esrrhs%2Fprintf_vector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esrrhs%2Fprintf_vector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esrrhs","download_url":"https://codeload.github.com/esrrhs/printf_vector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243515516,"owners_count":20303256,"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":["printf","vector"],"created_at":"2024-11-19T18:53:42.885Z","updated_at":"2025-03-14T02:48:06.755Z","avatar_url":"https://github.com/esrrhs.png","language":"C++","readme":"# printf_vector\n[\u003cimg src=\"https://img.shields.io/github/license/esrrhs/printf_vector\"\u003e](https://github.com/esrrhs/printf_vector)\n[\u003cimg src=\"https://img.shields.io/github/languages/top/esrrhs/printf_vector\"\u003e](https://github.com/esrrhs/printf_vector)\n[\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/esrrhs/printf_vector/cmake.yml?branch=master\"\u003e](https://github.com/esrrhs/printf_vector/actions)\n\nlike libc printf, but can use vector input.\n\nmodify from [eyalroz/printf](https://github.com/eyalroz/printf) to support vector\n\n* for cpp\n* header only\n* use std::snprintf\n* add namespace\n* add vector support\n\n## Usage\nthe example code is in [main.cpp](./main.cpp)\n```cpp\nprintf_vector::vector_input input;\ninput.add(1);\ninput.add(2.2f);\ninput.add(\"333\");\ninput.add((void *) 0x4);\ninput.add(2);\ninput.add(\"55555\");\ninput.add(5);\ninput.add(6);\ninput.add(1.12345);\n\nconst char *fmt = \"Hello, World! int=%d float=%f string=%s pointer=%p short-string=%.*s width-int=%*d short-float=%.2f\\n\";\nprintf_vector::printfv(fmt, \u0026input);\n```\nand the output is\n```bash\nHello, World! int=1 float=2.200000 string=333 pointer=0000000000000004 short-string=55 width-int=    6 short-float=1.12\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesrrhs%2Fprintf_vector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesrrhs%2Fprintf_vector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesrrhs%2Fprintf_vector/lists"}