Only Bolivian Here Only Bolivian Here - 1 month ago 15
Ruby Question

How can I get a substring from position N to the last char in Ruby 1.8.7?

I'd like to get a substring from a string from position N to the end of the string.

What's the way to do it in RUby?

Answer

Just slice the string like:

string[N..-1]
Comments