Template:Trim

From ZooTerms (Dictionary of Invertebrate Zoology)
Revision as of 10:22, 4 September 2013 by Andreas Plank (Talk | contribs) (Created page with "{{#if:true|{{{1}}} }}<noinclude> {{Documentation}} </noinclude>")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

{{{1}}}

[edit] [purge] Template-info.svg Template documentation

Usage

This template trims whitespace and extra newlines from the start and end of the parameter. Example:

000{{Trim|1=

zzz zzz

zzz zzz  

}}000

gives: "000zzz zzz

zzz zzz000"

Warning

Although it is possible to use the template without the "1=", such usage will break whenever an equal sign occurs in the input (the part before the "=" will then be consider a parameter name). Using the template with a named (here first number) parameter prevents this.