Ruby 2.6 introduced endless ranges, which basically remove the need to have to specify the end index. In your case, you can do:
s = "hello world"
s[6..]
Ruby 2.6 introduced endless ranges, which basically remove the need to have to specify the end index. In your case, you can do:
s = "hello world"
s[6..]