ifArrayJoin

Interface providing Join to concatenate array elements into a single string

Implemented by

NameDescription
roArrayStores an indexed collection of BrightScript objects. Each entry of an array can be a different type, or they may all be of the same type.

Supported methods

Join(separator as String) as String

Description

Creates a string by joining all array elements together separated by the specified separator. All elements must be of type String; otherwise, an empty string is returned

Parameters
NameTypeDescription
separatorStringThe string used to separate elements in an array.
Return Value

A String containing the array elements.

Examples
    a = ["ant","bat","cat"]
    s = a.Join(",")
    print """" + s + """"
    ' "ant,bat,cat"

    a = "abc".Split("")
    s = a.Join("--")
    print """" + s + """"
    ' "a--b--c"

Did this page help you?