Template:HasStr
Jump to navigation
Jump to search
Template documentation (for the template shown above, sometimes hidden or invisible)
- Description
- Alternative named string matching search.
- Easier, and clearer code, when used in other templates.
- Syntax
{{hasStr|full-String|substring}}
- Output
- 1 if a match was found.
- <empty string> if no match was found.
- Note
- The <empty string> output allows for simpler True/False-checking for multiple cases at the same time.
- Example:
{{#if: {{hasStr|.1.}}{{hasStr|.2.}}...{{hasStr|.n.}} | T(at least one true case) | F(all false) }}
Visit Template:HasStr/doc to edit this text! (How does this work?)