> I'm actually hoping this is an embarrassing question but how do you get
> the tail end of a string?  All I've figured out is this:
> 
> index = 4
> string[index, string.size - index]
> 
>     ...but surely there's a better way.  This happens to me a lot and I
> really appreciate Python's curt syntax in this case:  string[index:]
>     What's the Ruby way?
> 
>   Thank you!

str = "hello"
result = str[1..-1]

p result
--output:--
"ello"
-- 
Posted via http://www.ruby-forum.com/.