When do you use table.concat?

When do I use table.concat?
I’m posting table functions on another site: Korea forum.
and I found table.concat
I know it returns t[i] … sep … t[i+1] … sep … t[j].
But i don’t know when i should use table.concat… XD
Do you know it?

asdasd
and what is the meaning of ‘…’?
I couldn’t find what it is… :frowning:

You’d want to use table.concat when you need to merge a table into a string, for example chat commands:

Instead of doing
arguments[1], arguments[2], arguments[3] and being limited you can instead do
table.concat(arguments," ") and get the arguments as a string.

One thing to note is that you’d need to remove some arguments from the table before merging the table, as you’d end up with this
image
and no one really wants to include the username in the kick reason.

4 Likes