jinja2.runtime.to_string.index

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

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