{"id":21654858,"url":"https://github.com/localvoid/cxx-fmt","last_synced_at":"2025-08-09T19:07:26.794Z","repository":{"id":6778255,"uuid":"8025338","full_name":"localvoid/cxx-fmt","owner":"localvoid","description":"C++ string formatting library","archived":false,"fork":false,"pushed_at":"2013-02-09T08:12:07.000Z","size":260,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T06:25:25.520Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/localvoid.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-05T08:33:37.000Z","updated_at":"2024-12-15T18:33:18.000Z","dependencies_parsed_at":"2022-09-15T13:51:38.038Z","dependency_job_id":null,"html_url":"https://github.com/localvoid/cxx-fmt","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/localvoid%2Fcxx-fmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localvoid%2Fcxx-fmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localvoid%2Fcxx-fmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localvoid%2Fcxx-fmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/localvoid","download_url":"https://codeload.github.com/localvoid/cxx-fmt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244554121,"owners_count":20471173,"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":[],"created_at":"2024-11-25T08:29:14.467Z","updated_at":"2025-03-20T04:42:48.309Z","avatar_url":"https://github.com/localvoid.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"===============================\n C++ string formatting library\n===============================\n\nThe library is in alpha state.\n\nAnd currently doesn't support fast conversion of floating point\nvalues, it is now using sprintf for this purposes.\n\nSynopsis\n--------\n\n::\n\n  #include \u003cfmt/format.hpp\u003e\n\n  template\u003ctypename ...Args\u003e\n  uint32_t fmt::format(const char *out, const char *format, Args\u0026\u0026 ... args);\n\n\nDescription\n-----------\n\nFormat strings contain \"placeholder fields\" surrounded by curly braces\n`{}`. Anything that is not contained in braces is considered literal\ntext. If you need to include a open brace character in the literal\ntext, it can be escaped by doubling: {{.\n\n::\n\n  fmt::format(\"Hello curly brace {{ and {}\", \"world\");\n\n\nArgument specification\n++++++++++++++++++++++\n\n::\n\n  arg       = '{' arg_index? (':' flags* options*)? '}'\n  arg_index = [0-9]+\n  flags     = [\u003c\u003e+ cefoxEGX%#0,]\n  options   = (width | precision)\n  width     = 'w' [0-9]+\n  precision = '.' [0-9]+\n\nFlags\n+++++\n\n==== =================================================================\nFlag Description\n==== =================================================================\n\u003e    Align right\n\u003c    Align left\n\\+   A sign (+ or -) should always be placed before a number.\n' '  A space should be placed before a positive number.\nc    Convert to char\ne    Exponent\nf    Fixed\no    Octal\nx    Hexadecimal\nE    Upper Exponent\nG    Large Exponent\nX    Upper Hexadecimal\n%    Percentage\n#    Prefixed\n0    Zero padding\n,    Comma separator\n==== =================================================================\n\nOptions\n+++++++\n\n\nExample\n-------\n\n::\n\n  char buf[128];\n  uint32_t size = fmt::format(buf, \"format integer: {:X\u003ew6}\", 0xff);\n  std::cout \u003c\u003c std::string(buf, size) \u003c\u003c std::endl;\n\nshould output: ``\"format integer:   0xFF\"``\n\n\nRoadmap\n-------\n\n - Native floating point conversion\n - Width flag for string values\n - Percentage flag\n - Unit Tests coverage\n - API for IO stream\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalvoid%2Fcxx-fmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocalvoid%2Fcxx-fmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalvoid%2Fcxx-fmt/lists"}