LuaNET, the lua 5.1 api documentation!

Lua-Api

Table

[LUA 5.1] table.concat

function table.concat ( t, sep, i, j )
Given an array where all elements are strings or numbers, returns t[i]..sep..t[i+1] ··· sep..t[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.

Code
mytable={}
table.insert(mytable,"This")
table.insert(mytable,"is")
table.insert(mytable,"content")
print(table.concat(mytable,'-')) -- This-is-content

Comments

© 2007 DracoBlue :: Valid XHTML, CSS, RSS Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC | SourceNet © 2007, DracoBlue :: Page created in 0.248 seconds with 30 queries.