{"id":16690854,"url":"https://github.com/mpark/format","last_synced_at":"2026-03-09T00:31:59.185Z","repository":{"id":19564382,"uuid":"22813474","full_name":"mpark/format","owner":"mpark","description":"Compile-time Checked, Type-Safe Formatting in C++14","archived":false,"fork":false,"pushed_at":"2017-04-19T21:13:48.000Z","size":21,"stargazers_count":36,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-04T16:28:59.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mpark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE_1_0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-10T16:40:21.000Z","updated_at":"2024-06-08T11:04:17.000Z","dependencies_parsed_at":"2022-08-21T09:41:08.441Z","dependency_job_id":null,"html_url":"https://github.com/mpark/format","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mpark/format","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpark%2Fformat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpark%2Fformat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpark%2Fformat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpark%2Fformat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpark","download_url":"https://codeload.github.com/mpark/format/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpark%2Fformat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30278516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-12T16:05:46.061Z","updated_at":"2026-03-09T00:31:59.168Z","avatar_url":"https://github.com/mpark.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MPark.Format\n\n\u003e Compile-time Checked, Type-Safe Formatting in __C++14__.\n\n[![stability][badge.stability]][stability]\n[![license][badge.license]][license]\n[![wandbox][badge.wandbox]][wandbox]\n\n[badge.stability]: https://img.shields.io/badge/stability-experimental-orange.svg\n[badge.license]: http://img.shields.io/badge/license-boost-blue.svg\n[badge.wandbox]: https://img.shields.io/badge/try%20it-on%20wandbox-green.svg\n\n[stability]: http://github.com/badges/stability-badges\n[license]: https://github.com/mpark/patterns/blob/master/LICENSE_1_0.txt\n[wandbox]: https://wandbox.org/permlink/NfSCfnToS2QCJy36\n\n## Introduction\n\n__MPark.Format__ is an experimental compile-time checked, type-safe formatting\nlibrary for __C++14__.\n\nCurrently, it supports Python-like format strings with positional parameters.\n\n```cpp\n#include \u003ciostream\u003e\n#include \u003costream\u003e\n\n#include \u003cmpark/format.hpp\u003e\n\nstruct Date {\n  int year, month, day;\n};\n\nstd::ostream \u0026operator\u003c\u003c(std::ostream \u0026strm, const Date \u0026that) {\n  return strm \u003c\u003c mpark::format(\n             FS(\"{0}-{1}-{2}\"), that.year, that.month, that.day);\n}\n\nint main() {\n  std::cout \u003c\u003c mpark::format(FS(\"{0}{1}{0}\\n\"), \"abra\", \"cad\");\n  // prints: \"abracadabra\"\n\n  // std::cout \u003c\u003c mpark::format(FS(\"{0}, {1}\\n\"), 'x');\n  // error: Index out of range.\n\n  std::cout \u003c\u003c mpark::format(FS(\"The date is {0}.\\n\"), Date{2016, 4, 19});\n  // prints: \"The date is 2016-4-19.\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpark%2Fformat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpark%2Fformat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpark%2Fformat/lists"}