stringer

Useful utilities patched on top of the lovely crystal's String.

Photo by Thomas Kelley on Unsplash

Project Health Status

TODO: add badges in here

Getting Started

Add the dependency to your shard.yml:

dependencies:
  stringer:
    github: cmd-coffee/stringer

Install your shards:

> shards install

Require it:

require "stringer"

Strum along:

strum = "The quick brown fox jumps over the lazy dog"
strum.truncate(28) # => "The quick brown fox jumps..."

strum = "  some \t\n messy\ttxt \n\t   "
strum.squish #=> "some messy txt"

Contributing

  1. Fork it (https://github.com/cmd-coffee/stringer/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request