Template:If-Instring

If parameter "searchterm" exists in parameter "string", then the parameter "then" is returned, else the parameter "else". If else is missing, an empty string is returned in the second case

USAGE: == returns actually "==", expected: "=found=" == returns actually "==", expected: "=not found="

Note on the code: If the search term is found, the return value of #pos is a zero-based integer of the first position within the string (and #if is true). If the search term is not found, the function returns an empty string (and #if is false).