Template:Ifcontains/doc
Jump to navigation
Jump to search
This is the template documentation for {{Ifcontains}}. It is transcluded from Template:Ifcontains/doc and may be directly edited there.
Purpose
This template checks to see if a string is contained within another string, returning a specific value if present and another value if not present.
Syntax
{{ifcontains| stringToSearch | searchString | valueIfSearchStringFound | valueIfSearchStringNotFound}}
Usage
{{ifcontains| abcde | a | found | notfound }}
returns "found"
{{ifcontains| abcde | x | found | notfound }}
returns "notfound"
Example
For a real-world example of how to use this template, see Template:Barterer.