Template:Trim2: Difference between revisions

From Elwiki
(Created page with "<includeonly>{{#regexall:{{{1|}}}|/\n/|}}</includeonly><noinclude>{{Doc}}</noinclude>")
 
m (Protected "Template:Trim2": Highly used pages/files/templates ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#regexall:{{{1|}}}|/\n/|}}</includeonly><noinclude>{{Doc}}</noinclude>
<includeonly>{{#regex:{{#regex:{{{1|}}}|/ /m|&nbsp;}}|/\n/m|}}</includeonly><noinclude>{{Doc}}[[Category:Formats]]</noinclude>

Latest revision as of 11:31, 14 March 2022

Information: If you want to test this template, please use Sandbox.
This documentation is transcluded from Template:Trim2/doc.

Overview

A quick template that gets rid of line breaks of the input string.

Usage

{{trim2|
 Lorem
 ipsum
 dolor 
 sit 
 amet.}}

Result: Lorem ipsum dolor sit amet.

Also, rips whitespace from the end and the beginning like Template:Trim.