arrayitemsandwich(
ORIGINALARRAY
,
SEPARATOR
,
PREFIX
,
SUFFIX
)

The arrayitemsandwich( function adds a prefix and/or suffix to each non-blank item in a text array.


Parameters

This function has four parameters:

originalarray – the original array.

separator – the array’s separator character or characters.

prefix – the prefix text that will be added in front of each non-blank array item (or "" if nothing is to be added before).

suffix – the suffix text that will be added after each non-blank array item (or "" if nothing is to be added after).


Description

This function adds a prefix and/or suffix to each non-blank item in an array. The first parameter is the array, the second is the separator. The third parameter is the prefix to be added before each array item (or “” if none). The fourth parameter is the suffix to be added after each array item (or “” if none).

arrayitemsandwich("red,blue,green",",","(",")") ☞ (red),(blue),(green)
arrayitemsandwich("red blue green"," ","<tag>","</tag>")
    ☞ <tag>red</tag> <tag>blue</tag> <tag>green</tag>

See Text Arrays for more information about arrays. Also see the sandwich( function.


See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0 but more than one character is now allowed for use as the separator parameter