Name: eraser
Owner: Poll Everywhere
Description: Erase or replace unicode space separators and line terminators.
Created: 2015-08-06 18:38:48.0
Updated: 2017-10-01 15:24:39.0
Pushed: 2015-08-06 19:26:16.0
Size: 120
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Erase or replace unicode space separators and line terminators.
Sepace separators are replaced with a space and line terminators are replaced with a newline.
Inspired by https://github.com/roysharon/uninums
John Kruger is a U.S. Marshal working for the Space Line Protection Program (SLPP) specializing in “erasing” controversial characters and replacing them with puppets for their safety…
Add this line to your application's Gemfile:
'eraser'
And then execute:
$ bundle
Or install it yourself as:
$ gem install eraser
ire "eraser"
Kruger.erase("\uFEFF") # => " "
Kruger.erase("\u2029") # => "\n"
er.erase("\uFEFF") # => " "
er.erase("\u2029") # => "\n"
er::LineTerminators.erase("\u2029", "P") # => "P"
er::SpaceSeparators.erase("\uFEFF", "S") # => "S"
To install this gem onto your local machine, run bundle exec rake install
.
To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/polleverywhere/eraser.
The gem is available as open source under the terms of the MIT License.