Use string::rfind rather than find_last_of