JoinStrings

(System Library)

Description: Joins an array of string elements together into one string, with a given separator added between each element from the array.
Returns: String
Usage: Script Only.
Function Groups: String and Buffer
Related to: SplitString
Format: System.JoinStrings(StringArray[, Delimiter, Count])
Parameters:  
StringArray
Required. One-dimensional array containing text elements to be joined into a string. Numeric elements will be treated as strings.
Delimiter
Optional text. The character (or characters) to be inserted between array elements in the output string. Defaults to "".
Count
Optional integer. If provided, then no more than Count array elements will be used in the resulting string.
Comments:

This module is a member of the System Library, and must therefore be prefaced by \System. as shown in the "Format" section.

If your application predates version 11.2, use the backslash notation rather than dot: \System\

Example:

[
  SomeArray         { Array of words                     };
  SomeText          { comma delimited list               };
  
]
Init [ If 1 Main;
  [
    SomeArray = New(3);
    SomeArray[0] = "One";
    SomeArray[1] = "Two";
    SomeArray[2] = "Three";
    SomeText = System.JoinStrings(SomeArray, ", ");
  ]
]
Main [
  ZText(100, 100, SomeText, 5, 0); 
]