The Template:Join joins text parameters, or re-joins text split into separate segments, possibly on multiple lines. Up to 20 parameters can be specified to join the text.

Any spaces between parameters are omitted when joined, and so a website URL address can be split into multiple parts/lines and joined back together. Also, any newlines between multiple lines are omitted, as well, to produce a single string of text. However, any spaces (or newlines) within each separate parameter are retained, to allow a sentence to be re-joined intact if split within words (not between words).

Usage edit

{{join|Hello |world}}              gives: Helloworld
{{join|Combine |All |Text}} gives: CombineAllText
{{join|A |    B|C|D   |E|F|G}}     gives: ABCDEFG

Examples edit

Long quotes: A common case for joining text would be a long quotation, split into separate lines:

quote= {{join
| ''This is part 1 of long quotation
| , and this is part 2 of quotation
| . Here is part 3 of quotation.''
}}     gives:   quote= This is part 1 of long quotation, and this is part 2 of quotation. Here is part 3 of quotation.

With a long quotation split into multiple parts, the separate parts can be edited without wp:edit-conflicts against the surrounding text, and {join} treats the whole text as if entered on one long line.

Long numerals: A rare example would be connecting the digits of a very long number, such as pi to 35 digits: {{join

| 3.14159 | 26535 | 89793
|    23846 | 26433 | 83279
|    50288}} gives: 3.14159265358979323846264338327950288

In general, some distances in astronomy could be split to use {join}.

Template Data edit

Joins all parameters, and up to 20 can be given.

Template parameters

ParameterDescriptionTypeStatus
First word/phrase1

First of 20 parameters to join, but newlines or<br> spaces between parameters are omitted.

Stringoptional