extend/string: backport #rpartition