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