See str.rpartition.