instance method
ljust
Ruby on Rails 3.0.20
Since v2.2.3 Last seen in v3.2.22.5Signature
ljust(integer, padstr=' ')
Works just like String#ljust, only integer specifies characters instead of bytes.
Example:
"¾ cup".mb_chars.rjust(8).to_s # => "¾ cup " "¾ cup".mb_chars.rjust(8, " ").to_s # Use non-breaking whitespace # => "¾ cup "
Parameters
-
integerreq -
padstropt = ' '
Source
# File activesupport/lib/active_support/multibyte/chars.rb, line 221
def ljust(integer, padstr=' ')
justify(integer, :left, padstr)
end
Defined in activesupport/lib/active_support/multibyte/chars.rb line 221
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Multibyte::Chars