Name
Concat -- concatenate table strings into a single string (V5.0)
Synopsis
s$ = Concat(table[, sep$, start, end])
Function
This function can be used to concatenate the strings from table indices start to end to a single string that is optionally delimited by the string specified in sep$. If start and end are not specified, they default to 0 and number of table items minus one respectively, which means that by default all table strings are concatenated. If sep$ is not specified, it will default to the empty string which means that no separator will be put between the strings.

Please note that this function will only take strings at integer indices into account. Strings at non-integer indices will not be concatenated.

Inputs
table
table that should be used as the source
sep$
optional: separator string to use (defaults to "")
start
optional: table index of first string to concatenate (defaults to 0, which means start at index 0 of the table)
end
optional: table index of the last string to concatenate (defaults to number of table items minus one, which means end at the end of the table)
Example
t = {"Hello", "this", "is", "a", "test!"}
DebugPrint(Concat(t, " "))
The code above concatenates all strings of the table and separates them by inserting a space character.

Show TOC