{"id":28736189,"url":"https://github.com/foxbenjaminfox/ex_textwrap","last_synced_at":"2025-10-19T11:38:29.876Z","repository":{"id":62430436,"uuid":"338269731","full_name":"foxbenjaminfox/ex_textwrap","owner":"foxbenjaminfox","description":"Elixir NIF bindings to the textwrap crate, for wrapping and indenting text.","archived":false,"fork":false,"pushed_at":"2021-07-08T15:50:53.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T17:16:38.919Z","etag":null,"topics":["elixir","formatting","nif","textwrap"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foxbenjaminfox.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}},"created_at":"2021-02-12T09:08:40.000Z","updated_at":"2021-07-08T15:50:56.000Z","dependencies_parsed_at":"2022-11-01T20:18:26.246Z","dependency_job_id":null,"html_url":"https://github.com/foxbenjaminfox/ex_textwrap","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/foxbenjaminfox/ex_textwrap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxbenjaminfox%2Fex_textwrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxbenjaminfox%2Fex_textwrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxbenjaminfox%2Fex_textwrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxbenjaminfox%2Fex_textwrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foxbenjaminfox","download_url":"https://codeload.github.com/foxbenjaminfox/ex_textwrap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxbenjaminfox%2Fex_textwrap/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260079420,"owners_count":22955701,"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":["elixir","formatting","nif","textwrap"],"created_at":"2025-06-16T01:05:58.141Z","updated_at":"2025-10-19T11:38:29.872Z","avatar_url":"https://github.com/foxbenjaminfox.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Textwrap\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/foxbenjaminfox/ex_textwrap\"\u003e\n    \u003cimg src=\"https://img.shields.io/circleci/build/github/foxbenjaminfox/ex_textwrap\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://hex.pm/packages/textwrap\"\u003e\n    \u003cimg src=\"https://img.shields.io/hexpm/v/textwrap\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://hex.pm/packages/textwrap\"\u003e\n    \u003cimg src=\"https://img.shields.io/hexpm/dt/textwrap\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/foxbenjaminfox/ex_textwrap/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/foxbenjaminfox/ex_textwrap\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nTextwrap is a set of NIF bindings to the [`textwrap`](https://github.com/mgeisler/textwrap) Rust crate, for wrapping, indenting, and dedenting text.\n\n## Installation\n\nThis package is [available in Hex](https://hex.pm/packages/textwrap), and can be installed\nby adding `textwrap` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:textwrap, \"~\u003e 0.4.0\"}\n  ]\nend\n```\n\n## Getting Started\n\nUse `fill/2` to get a wrapped string, or `wrap/2` to get a list of wrapped lines:\n\n```elixir\niex\u003e Textwrap.fill(\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor\", 30)\n\"Lorem ipsum dolor sit amet,\\nconsectetur adipisicing elit,\\nsed do eiusmod tempor\"\n\niex\u003e Textwrap.wrap(\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor\", 30)\n[\"Lorem ipsum dolor sit amet,\", \"consectetur adipisicing elit,\", \"sed do eiusmod tempor\"]\n```\n\nThe second argument to `fill/2` or `wrap/2` can instead be a keyword list with the desired width as well as [further options](https://hexdocs.pm/textwrap/Textwrap.html#wrap/2):\n```elixir\niex\u003e Textwrap.wrap(\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor\", width: 30, initial_indent: \"\u003e \", subsequent_indent: \"\u003e\u003e \")\n[\"\u003e Lorem ipsum dolor sit amet,\", \"\u003e\u003e consectetur adipisicing\", \"\u003e\u003e elit, sed do eiusmod tempor\"]\n```\n\nThe width can either be a positive integer, or `:termwidth`. In the latter case, the width of the terminal connected to standard output is used, or a fallback width of 80 otherwise.\n\nSee the [API docs](https://hexdocs.pm/textwrap) for more details.\n\n## License\n\n`textwrap` is distributed under the Apache License, version 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxbenjaminfox%2Fex_textwrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxbenjaminfox%2Fex_textwrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxbenjaminfox%2Fex_textwrap/lists"}