Ruby implementation of famous npm package.
Add following line to your Gemfile:
And then execute:
Or install it system-wide:
$ gem install left_pad
Simple as that:
require 'left_pad' 'foo'.leftpad(5) # => " foo" 'foobar'.leftpad(6) # => "foobar" String(1).leftpad(2, 0) # => "01"
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request
Don't take it seriously. It's just a joke ;)