{"id":28865519,"url":"https://github.com/busyloop/cythara","last_synced_at":"2025-07-01T04:06:13.920Z","repository":{"id":193891500,"uuid":"689651974","full_name":"busyloop/cythara","owner":"busyloop","description":"A small collection of String helpers","archived":false,"fork":false,"pushed_at":"2023-09-10T14:37:44.000Z","size":485,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-20T10:13:36.548Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Crystal","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/busyloop.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}},"created_at":"2023-09-10T13:45:52.000Z","updated_at":"2025-01-12T08:17:02.000Z","dependencies_parsed_at":"2023-09-10T16:43:01.100Z","dependency_job_id":null,"html_url":"https://github.com/busyloop/cythara","commit_stats":null,"previous_names":["busyloop/cythara"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/busyloop/cythara","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fcythara","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fcythara/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fcythara/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fcythara/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/busyloop","download_url":"https://codeload.github.com/busyloop/cythara/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/busyloop%2Fcythara/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262893640,"owners_count":23380710,"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":"2025-06-20T10:13:33.372Z","updated_at":"2025-07-01T04:06:13.904Z","avatar_url":"https://github.com/busyloop.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cythara\n\n[![CI](https://github.com/busyloop/cythara/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/busyloop/cythara/actions/workflows/ci.yml?query=branch%3Amaster) [![GitHub](https://img.shields.io/github/license/busyloop/cythara)](https://en.wikipedia.org/wiki/MIT_License) [![GitHub release](https://img.shields.io/github/release/busyloop/cythara.svg)](https://github.com/busyloop/cythara/releases)\n\nA small collection of String helpers.  \n\n\n\n## Features\n\n##### Text formatting\n\n* `linewrap` - Wrap a String at a given width\n* `wordwrap` - Wrap a String to a given width at word boundaries\n\n##### ANSI\n\n* `contains_ansi?` - Detect ANSI escape codes\n* `strip_ansi` - Strip ANSI escape codes\n\n\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n   ```yaml\n   dependencies:\n     cythara:\n       github: busyloop/cythara\n   ```\n\n2. Run `shards install`\n\n\n\n## API\n\n* 📚 [API Documentation](https://busyloop.github.io/cythara/Cythara.html)\n\n\u003cimg src=\"./assets/pointer.png\" width=\"200\" align=\"left\" /\u003e\u003cbr clear=\"left\" /\u003e\n\n## Usage\n\n```crystal\nrequire \"cythara/wrap\"\nCythara.wordwrap(\"The quick brown fox\", 12) # =\u003e [\"The quick\", \"brown fox\"]\nCythara.linewrap(\"The quick brown fox\", 12) # =\u003e [\"The quick br\", \"own fox\"]\n\nrequire \"cythara/ansi\"\nCythara.contains_ansi?(\"\\e[31;1mRed Fox\") # =\u003e true\nCythara.strip_ansi(\"\\e[31;1mRed Fox\")     # =\u003e \"Red Fox\"\n```\n\n\n\n## Usage for lazy monkeys 🐒\n\n```crystal\nrequire \"cythara/string\"\n\n\"The quick brown fox\".wordwrap(12) # =\u003e [\"The quick\", \"brown fox\"]\n\"The quick brown fox\".linewrap(12) # =\u003e [\"The quick br\", \"own fox\"]\n\n\"\\e[31;1mRed Fox\".contains_ansi? # =\u003e true\n\"\\e[31;1mRed Fox\".strip_ansi     # =\u003e \"Red Fox\"\n```\n\n\n## Credits\n\nThe `strip_ansi` and `contains_ansi?` methods were ported\nfrom the [strings-ansi](https://github.com/piotrmurach/strings-ansi) Ruby gem by Piotr Murach.\n\n\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/busyloop/cythara/fork\u003e)\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 a new Pull Request\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbusyloop%2Fcythara","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbusyloop%2Fcythara","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbusyloop%2Fcythara/lists"}