SPLIT

Action

Returns a zero-based, one-dimensional array containing a specified number of substrings.

 

Syntax

SPLIT ("string", "delimiter", count)

 

Parameter

String

Required. String expression containing substrings and delimiters. If expression is a zero-length string, Split returns an empty array, that is, an array with no elements and no data.

Delimiter

Optional. String character(s) used to identify substring limits. If omitted, the space character (" ") is assumed to be the delimiter. If delimiter is a zero-length string, a single-element array containing the entire expression string is returned.

Count

Optional. Number of substrings to be returned; -1 indicates that all substrings are returned.

Returns

An array containing the substrings found in the input string.

 

Example

$Myarray = Split("aaa~~bbb~~ccc", "~~")

 

For Each $Element In $MyArray

   ? $Element      ; will display "aaa", "bbb" and "ccc"

Next