Difference between revisions of "Table.concat"
From GiderosMobile
(remove language stuff) |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
Line 7: | Line 7: | ||
The default value for sep is the empty string, the default for i is 1, and the default for j is the length of the table. If i is greater than j, returns the empty string. | The default value for sep is the empty string, the default for i is 1, and the default for j is the length of the table. If i is greater than j, returns the empty string. | ||
− | < | + | <syntaxhighlight lang="lua"> |
(string) = table.concat(table,sep,i,j) | (string) = table.concat(table,sep,i,j) | ||
</source> | </source> |
Revision as of 14:31, 13 July 2023
Available since: Gideros 2011.6
Class: table
Description
Given an array where all elements are strings or numbers, returns table[i]..sep..table[i+1] ··· sep..table[j].
The default value for sep is the empty string, the default for i is 1, and the default for j is the length of the table. If i is greater than j, returns the empty string. <syntaxhighlight lang="lua"> (string) = table.concat(table,sep,i,j) </source>
Parameters
table: (table) table of values to concatenate
sep: (string) separator what to insert between table elements optional
i: (number) concatenate from this element (default is 1) optional
j: (number) concatenate until this element (default is table length) optional
Return values
Returns (string) concatenated string