Ruby implementation of famous npm package
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
.rspec
.travis.yml
Gemfile
LICENSE
README.md
Rakefile
left_pad.gemspec

README.md

left_pad

Gem Version Code Climate Build Status

Ruby implementation of famous npm package.

Installation

Add following line to your Gemfile:

gem 'left_pad'

And then execute:

$ bundle

Or install it system-wide:

$ gem install left_pad

Usage

Simple as that:

require 'left_pad'

'foo'.leftpad(5)
# => "  foo"

'foobar'.leftpad(6)
# => "foobar"

String(1).leftpad(2, 0)
# => "01"

Contributing

  1. Fork it
  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 new Pull Request

P.S.

Don't take it seriously. It's just a joke ;)