Search notes:

VBA function: join

join(arrayVariable, joinString) creates a string from the values of the elements in an array by inserting joinString between the element values.
Thus, it behaves quite the same as Perl's join function.
option explicit

sub main() ' {

    dim ary(1 to 3) as string

    ary(1) = "foo"
    ary(2) = "bar"
    ary(3) = "baz"

    dim txt as string
    txt = join(ary, " - ")

    debug.print txt

end sub ' }
Github repository about-VBA, path: /functions/join.bas
The opposite of join is split

See also

VBA functions

Index