instance method
from
Ruby on Rails 3.1.12
Since v3.0.20Signature
from(position)
Returns the remaining of the string from the position treating the string as an array (where 0 is the first character).
Examples:
"hello".from(0) # => "hello" "hello".from(2) # => "llo" "hello".from(10) # => "" if < 1.9, nil in 1.9
Parameters
-
positionreq
Source
# File activesupport/lib/active_support/core_ext/string/access.rb, line 21
def from(position)
mb_chars[position..-1].to_s
end
Defined in activesupport/lib/active_support/core_ext/string/access.rb line 21
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in String