{"id":20051903,"url":"https://github.com/p-ranav/unicode_display_width","last_synced_at":"2025-05-05T11:32:02.662Z","repository":{"id":53746549,"uuid":"263760481","full_name":"p-ranav/unicode_display_width","owner":"p-ranav","description":"Displayed width of UTF-8 strings in Modern C++","archived":false,"fork":false,"pushed_at":"2023-01-02T20:04:23.000Z","size":510,"stargazers_count":47,"open_issues_count":0,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-08T22:23:57.497Z","etag":null,"topics":["aligned-text","alignment","cpp11","display","display-width","length","single-header","single-header-lib","unicode","utf8"],"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/p-ranav.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-13T22:50:00.000Z","updated_at":"2025-01-17T15:42:48.000Z","dependencies_parsed_at":"2023-02-01T04:01:08.667Z","dependency_job_id":null,"html_url":"https://github.com/p-ranav/unicode_display_width","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/p-ranav%2Funicode_display_width","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-ranav%2Funicode_display_width/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-ranav%2Funicode_display_width/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-ranav%2Funicode_display_width/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p-ranav","download_url":"https://codeload.github.com/p-ranav/unicode_display_width/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252489126,"owners_count":21756265,"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":["aligned-text","alignment","cpp11","display","display-width","length","single-header","single-header-lib","unicode","utf8"],"created_at":"2024-11-13T12:07:44.810Z","updated_at":"2025-05-05T11:32:02.064Z","avatar_url":"https://github.com/p-ranav.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg height=\"50\" src=\"img/logo.png\" alt=\"display_width\"/\u003e\n\u003c/p\u003e\n\nCross-platform single-header library to calculate the display width of UTF-8 strings. \n\n## Quick Start\n\n```cpp\n#include \u003cunicode/display_width.hpp\u003e\n\nint main() {\n    const std::string input = u8\"Ｈｅｌｌｏ, ｗｏｒｌｄ!\";\n    \n    // Calculate display width\n    const auto result = unicode::display_width(input);\n    \n    // Verify result\n    std::cout \u003c\u003c \"Input  : \" \u003c\u003c input \u003c\u003c \"\\n\";\n    std::cout \u003c\u003c \"Output : \" \u003c\u003c std::string(result, '|') \u003c\u003c \"\\n\";\n    std::cout \u003c\u003c \"Width  : \" \u003c\u003c result \u003c\u003c \"\\n\\n\";\n}\n```\n\n\u003cp\u003e\n  \u003cimg height=140 src=\"img/hello_world.png\" alt=\"hello_world\"/\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-ranav%2Funicode_display_width","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp-ranav%2Funicode_display_width","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-ranav%2Funicode_display_width/lists"}