polleverywhere/eraser

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

Homepage:

Size: 120

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Eraser

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

Plot

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…

Installation

Add this line to your application's Gemfile:

'eraser'

And then execute:

$ bundle

Or install it yourself as:

$ gem install eraser
Usage
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"
Development

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.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/polleverywhere/eraser.

License

The gem is available as open source under the terms of the MIT License.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.