Difference between revisions of "Template:Trim"
(Created page with "<includeonly>{{ {{{|safesubst:}}}#if:1|{{{x|{{{1|}}}}}}}}</includeonly>") |
|||
| Line 1: | Line 1: | ||
| − | <includeonly>{{ {{{|safesubst:}}}#if:1|{{{x|{{{1|}}}}}}}}</includeonly> | + | <noinclude> |
| + | ==Usage== | ||
| + | Trim any leading and trailing whitespace (including newlines) from the given parameter. | ||
| + | |||
| + | ==Example== | ||
| + | |||
| + | The following shorthand: | ||
| + | <pre><nowiki> | ||
| + | >{{Trim| | ||
| + | test string | ||
| + | |||
| + | }}< | ||
| + | </nowiki></pre> | ||
| + | |||
| + | Produces: | ||
| + | |||
| + | >{{Trim| | ||
| + | test string | ||
| + | |||
| + | }}< | ||
| + | |||
| + | </noinclude><includeonly>{{ {{{|safesubst:}}}#if:1|{{{x|{{{1|}}}}}}}}</includeonly> | ||
Latest revision as of 01:02, 18 February 2019
Usage
Trim any leading and trailing whitespace (including newlines) from the given parameter.
Example
The following shorthand:
>{{Trim|
test string
}}<
Produces:
>test string<