marcusshepp
6/13/2016 - 1:30 PM

rindex

rindex

# returns last index of occurance

s = "marcus shepherd"
x = s.rindex(" ")
# => 6
s[0..x-1]
# => "marcus"
s[x+1..s.length]
# => "shepherd"