Strings In Depth18 / 19
Up next

Slice by range

s = "hello world"
# inclusive range
puts s[0..4]
# negative indexes count from the end
puts s[-5..]
puts s[-1]
What you're solving

ranges and negative indexes