Navigation: Templates > Template Language Reference > Built-in Template Procedures >====== UNSPLIT (merge a multiple line string to single line) ====== | |
UNSPLIT ( string )
UNSPLIT | Merge a multiple line attribute string to a single line |
string | A string constant, template symbol or expression containing a comma delimited list of attributes. |
UNSPLIT is used to merge a multiple line attribute string to a single line.
If the string is split into multiple lines, and connected using the line continuation character ( | ), UNSPLIT merges all lines together into a single line. Some unneeded whitespaces between attributes may also be removed by UNSPLIT.
We need to clarify the term “comma delimited list of attributes” as used in SPLIT, UNSPLIT, EXTRACT, REPLACE and SEPARATOR functions. These functions assume that the string parameter has the following form:
[<;label>] <;attribute>,<;attribute>,<;attribute>, …
In addition, each <;attribute> has the following format:
<;name>[([<;parameter>],[<;parameter>],…)]
<;name> is an identifier, or an identifier with a leading # character or a string constant. <;parameter> is any valid expression.
The list of attributes may also have a leading <;label>, which is an identifier, and separated from the first attribute by one or more whitespaces.
UNSPLIT is also useful when used in connection with SEPARATOR. Otherwise, if a string is long, the template must handle any possible line breaks.