Template:Trim
Jump to navigation
Jump to search
Template documentation (for the template shown above, sometimes hidden or invisible)
- Trim leading and trailing white-space from string.
- Generally not needed. For specific cases.
- Source: Trim at Wikipedia
- code:
{{ {{{|safesubst:}}} #if: 1 | {{{ x | {{{1|}}} }}} }}
Potential simpler alternative. Trim at Mediawiki
{{#if:{{{1|}}}|{{{1|}}}}}
For direct local trimming:
{{#if:x|<result to trim>}}
Visit Template:Trim/doc to edit this text! (How does this work?)