arraystrip(
arraystrip(
ARRAY
,
SEPARATOR
)

The arraystrip( function removes any blank elements from a text array or a data array (see Text Arrays and Data Arrays).

Parameters

This function has two parameters:

array – the array that you want to strip the blank elements from.

separator – the separator character for this array. This parameter is omitted if the target array is a data array.

Description

This function returns a copy of the original array, with any blank array elements removed from the array.

    arraystrip("Red,,Green,,,,Blue",",") ☞ Red,Green,Blue
    arraystrip("   Now    is      the       time   "," ") ☞ Now is the time

#### Working with a Data Array

This function works with both data and text arrays. Because Data Arrays have no separators between elements, the separator parameter is omitted when targeting a data array.

The arraystrip( function operates on a data array a little differently to the way it does on a text array in that it strips out empty text, empty binary values and zero numeric (integer or floating point) values:

    exportdataarray(arraystrip(dataarray(3, "", 9, 0, 25, 0.00)),";") ☞ 3;9;25

See Also

- array( -- extracts a single data item from a text array or a data array (see Text Arrays and Data Arrays).
- arrayelement( -- converts between character positions and array element numbers in a text array.
- arrayrange( -- extracts a series of data items from a text array or a data array (see Text Arrays and Data Arrays).
- arraysearch( -- searches a text array or a data array (see Text Arrays and Data Arrays) to see if it contains a specific value.
- extract( -- extracts a single data item from a text array, and can also be used to count the number of items in the array.
- Text Arrays -- A numbered collection of text values.

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama 6.0