Trim – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "Category:Templates" to "{{uc:{{PAGENAME}}}}")
m (Add Template:Doc/Template usage)
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}|{{{1|}}}}}</includeonly><noinclude>
<includeonly>{{#if:{{{1|}}}|{{{1|}}}}}</includeonly><noinclude>{{Doc/Template
<pre>
|descr= <pre>{{Trim| {{{parameter|}}} }}</pre>
{{Trim| {{{parameter|}}} }}
|param1= text
</pre>
|descr1= text to trim
 
|example1= <code>   test   </code>
== Usage ==
|result1= <code>   test   </code>
<nowiki>{{Trim|</nowiki>'''''text'''''}}
|example2= <code><nowiki>{{Trim|   test   }}</nowiki></code>
* text: the text to trim
|result2= <code>{{Trim|   test   }}</code>
 
}}</noinclude>
{|class="wikitable"
|+ Examples
! Code
! Result
|-
| <code> test     </code>
| <code> test     </code>
|-
| <code><nowiki>{{Trim| test     }}</nowiki></code>
| <code>{{Trim| test     }}</code>
|}
 
[[Category:Templates|{{uc:{{PAGENAME}}}}]]
</noinclude>

Revision as of 22:27, 7 February 2021

{{Trim| {{{parameter|}}} }}

This template is used on these pages.

Usage

{{Trim|text}}

  • text: text to trim
Examples
Code Result
test test
{{Trim| test }} test