jinja2.runtime.to_string.rindex

to_string.rindex(sub[, start[, end]]) → int

Like S.rfind() but raise ValueError when the substring is not found.