arrayitemtrim(
ARRAY
,
SEPARATOR
,
LEFT
,
RIGHT
)

The arrayitemtrim( function removes characters from the beginning and/or end of each item in an array.


Parameters

This function has four parameters:

array – the array to be trimmed.

separator – the separator character.

left – number of characters to be removed from the left side of each item (or 0 if none)

right – number of characters to be removed from the right side of each item (or 0 if none).


Description

This function removes characters from the beginning and/or end of each item in an array.

arrayitemtrim("red.blue.green",".",0,1) ☞ re.blu.gree
arrayitemtrim("red.blue.green",".",1,1) ☞ e.lu.ree
arrayitemtrim("red.blue.green",".",1,0) ☞ ed.lue.reen
arrayitemtrim("(red).(blue).(green)",".",1,0) ☞ red.blue.green

See Text Arrays for more information about arrays.

Note: This function is equivalent to:

arrayfilter(thearray,thesep,{import()[}+str(1+theleft)+{,}+str(-1-theright)+{]})

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.