{"id":21586048,"url":"https://github.com/magiclen/utf8-width","last_synced_at":"2025-04-10T20:15:01.282Z","repository":{"id":57671389,"uuid":"274801211","full_name":"magiclen/utf8-width","owner":"magiclen","description":"To determine the width of a UTF-8 character by providing its first byte.","archived":false,"fork":false,"pushed_at":"2023-11-20T14:39:03.000Z","size":17,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T02:09:59.891Z","etag":null,"topics":["rust","unicode"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/magiclen.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":"2020-06-25T01:02:44.000Z","updated_at":"2022-12-24T10:26:47.000Z","dependencies_parsed_at":"2024-11-24T18:01:15.357Z","dependency_job_id":null,"html_url":"https://github.com/magiclen/utf8-width","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"1ab51e527647428f27392e9dfc5e8892ba98e314"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Futf8-width","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Futf8-width/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Futf8-width/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Futf8-width/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magiclen","download_url":"https://codeload.github.com/magiclen/utf8-width/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248288528,"owners_count":21078907,"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":["rust","unicode"],"created_at":"2024-11-24T15:12:29.963Z","updated_at":"2025-04-10T20:15:01.245Z","avatar_url":"https://github.com/magiclen.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"UTF-8 Width\n====================\n\n[![CI](https://github.com/magiclen/utf8-width/actions/workflows/ci.yml/badge.svg)](https://github.com/magiclen/utf8-width/actions/workflows/ci.yml)\n\nTo determine the width of a UTF-8 character by providing its first byte.\n\nReferences: https://tools.ietf.org/html/rfc3629\n\n## Examples\n\n```rust\nassert_eq!(1, utf8_width::get_width(b'1'));\nassert_eq!(3, utf8_width::get_width(\"中\".as_bytes()[0]));\n```\n\n## Benchmark\n\n```bash\ncargo bench\n```\n\n## Crates.io\n\nhttps://crates.io/crates/utf8-width\n\n## Documentation\n\nhttps://docs.rs/utf8-width\n\n## License\n\n[MIT](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclen%2Futf8-width","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagiclen%2Futf8-width","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclen%2Futf8-width/lists"}