jinja2.environment.TokenStream.next_if

TokenStream.next_if(expr)[source]

Perform the token test and return the token if it matched. Otherwise the return value is None.