{"id":13750641,"url":"https://github.com/katzer/mruby-unicode-display_width","last_synced_at":"2026-01-24T10:34:13.343Z","repository":{"id":42200572,"uuid":"86973518","full_name":"katzer/mruby-unicode-display_width","owner":"katzer","description":"Monospace Unicode character width in mruby","archived":false,"fork":false,"pushed_at":"2024-08-25T15:29:07.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-12-02T05:50:57.141Z","etag":null,"topics":["mruby","mruby-gem","unicode"],"latest_commit_sha":null,"homepage":null,"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/katzer.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":"2017-04-02T08:35:47.000Z","updated_at":"2024-08-25T15:29:10.000Z","dependencies_parsed_at":"2024-11-16T02:31:33.141Z","dependency_job_id":"0701ea96-15cc-498f-8fcf-83dde8774032","html_url":"https://github.com/katzer/mruby-unicode-display_width","commit_stats":null,"previous_names":["appplant/mruby-unicode-display_width"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/katzer/mruby-unicode-display_width","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fmruby-unicode-display_width","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fmruby-unicode-display_width/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fmruby-unicode-display_width/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fmruby-unicode-display_width/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/katzer","download_url":"https://codeload.github.com/katzer/mruby-unicode-display_width/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fmruby-unicode-display_width/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28711453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T23:51:44.727Z","status":"online","status_checked_at":"2026-01-24T02:00:06.909Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["mruby","mruby-gem","unicode"],"created_at":"2024-08-03T08:00:43.319Z","updated_at":"2026-01-24T10:34:13.326Z","avatar_url":"https://github.com/katzer.png","language":"C","readme":"# Unicode::DisplayWidth ___for mruby!___ \u003cbr\u003e [![Build Status](https://travis-ci.com/katzer/mruby-unicode-display_width.svg?branch=master)](https://travis-ci.com/katzer/mruby-unicode-display_width) [![Build status](https://ci.appveyor.com/api/projects/status/gyyr55n46at2regc/branch/master?svg=true)](https://ci.appveyor.com/project/katzer/mruby-unicode-display-width/branch/master)\n\nDetermines the monospace display width of a string in Ruby. Implementation inspired by [unicode-display_width][unicode-display_width] and based on http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c from the University of Cambridge.\n\n## Installation\n\nAdd the line below to your `build_config.rb`:\n\n```ruby\nMRuby::Build.new do |conf|\n  # ... (snip) ...\n  conf.gem 'mruby-unicode-display_width'\nend\n```\n\nOr add this line to your aplication's `mrbgem.rake`:\n\n```ruby\nMRuby::Gem::Specification.new('your-mrbgem') do |spec|\n  # ... (snip) ...\n  spec.add_dependency 'mruby-unicode-display_width'\nend\n```\n\n## Usage\n\nThe interace follows [unicode-display_width][unicode-display_width]. However custom overwrites nor the 2nd parameter for ambiguous values aren't supported. \n\n```ruby\nUnicode::DisplayWidth.of(\"⚀\") # =\u003e 1\nUnicode::DisplayWidth.of(\"一\") # =\u003e 2\n```\n\nWith String Extension:\n\n```ruby\n'⚀'.display_width #=\u003e 1\n'一'.display_width #=\u003e 2\n```\n\n## Development\n\nClone the repo:\n    \n    $ git clone https://github.com/katzer/mruby-unicode-display_width.git \u0026\u0026 cd mruby-unicode-display_width/\n\nCompile the source:\n\n    $ rake compile\n\nRun the tests:\n\n    $ rake test\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/katzer/mruby-unicode-display_width.\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License][license].\n\nMade with :yum: in Leipzig\n\n© 2017 Sebastián Katzer\n\n[unicode-display_width]: https://github.com/janlelis/unicode-display_width\n[license]: http://opensource.org/licenses/MIT\n","funding_links":[],"categories":["Natural Language Processing"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatzer%2Fmruby-unicode-display_width","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkatzer%2Fmruby-unicode-display_width","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatzer%2Fmruby-unicode-display_width/lists"}