{"id":20313130,"url":"https://github.com/adamyaxley/unformat","last_synced_at":"2025-04-11T16:51:43.467Z","repository":{"id":53926800,"uuid":"113718044","full_name":"adamyaxley/Unformat","owner":"adamyaxley","description":"Fastest type-safe parsing library in the world for C++14 or C++17 (up to 300x faster than std::regex)","archived":false,"fork":false,"pushed_at":"2019-03-13T09:18:48.000Z","size":45,"stargazers_count":39,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T12:53:36.473Z","etag":null,"topics":["cpp14","cpp17","extraction","formatting","header-only","parse","parser","parsing","parsing-library","string","unformat"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamyaxley.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}},"created_at":"2017-12-10T02:55:22.000Z","updated_at":"2025-03-04T18:39:36.000Z","dependencies_parsed_at":"2022-08-13T04:40:14.779Z","dependency_job_id":null,"html_url":"https://github.com/adamyaxley/Unformat","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/adamyaxley%2FUnformat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamyaxley%2FUnformat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamyaxley%2FUnformat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamyaxley%2FUnformat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamyaxley","download_url":"https://codeload.github.com/adamyaxley/Unformat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248443061,"owners_count":21104330,"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":["cpp14","cpp17","extraction","formatting","header-only","parse","parser","parsing","parsing-library","string","unformat"],"created_at":"2024-11-14T18:09:28.331Z","updated_at":"2025-04-11T16:51:43.445Z","avatar_url":"https://github.com/adamyaxley.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"**[Source available on GitHub](https://github.com/adamyaxley/Unformat)**\n\n# Unformat\nParsing and extraction of original data from brace style \"{}\" formatted strings. It basically _unformats_ what you thought was formatted for good.\n\n## Quick Example\nUnformat is simple to use and works on all basic types. See the below example for extracting a `std::string` and an 'int'\n```c++\nstd::string name;\nint age;\n\nunformat(\"Harry is 18 years old.\", \"{} is {} years old.\", name, age);\n// name == \"Harry\" and age == 18\n```\nAs an optimisation, if the format string is known at compile time, it can be parsed into a constant expression by making use of `ay::make_format`. In tests, this increases runtime speed by a factor of 3 or 4.\n```c++\nstd::string name;\nint age;\n\nconstexpr auto format = ay::make_format(\"{} is {} years old.\");\nunformat(\"Harry is 18 years old.\", format, name, age);\n// name == \"Harry\" and age == 18\n```\n\n## How do I use this library?\nUnformat is a single-file header only library so integration is easy. All you need to do is copy `unformat.h` into your project, and away you go.\n\n## Public Domain\nThis software is completely open source and in the public domain. See LICENSE for details.\n\n## Contributing\nPull requests are very welcome. You may also create Issues and I will have a look into it as soon as I can.\n\n## Speed\nUnformat is super awesome back to the future style lightning fast compared to traditional parsing methods. Below is the output from Google Benchmark on unformat_benchmark.cpp. Great Scott!\n```\nRun on (16 X 2993 MHz CPU s)\n03/13/19 18:10:57\n--------------------------------------------------------------------\nBenchmark                             Time           CPU Iterations\n--------------------------------------------------------------------\nUnformat                             72 ns         71 ns    8960000\nUnformat_ConstChar                   69 ns         70 ns    8960000\nUnformat_ConstexprMakeFormat         36 ns         35 ns   19478261\nStdStringStream                     844 ns        854 ns     896000\nStdRegex                           9975 ns      10010 ns      64000\nStdScanf                           1716 ns       1726 ns     407273\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamyaxley%2Funformat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamyaxley%2Funformat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamyaxley%2Funformat/lists"}