table = {"A", "B", "C")
Is there any way I can convert this totString = "ABC"Without knowing how many variables I have stored?
Question was answered here : http://stackoverflow...bles-in-a-table
Edited by KingofGamesYami, 18 April 2014 - 07:08 AM.
Posted 18 April 2014 - 07:02 AM
table = {"A", "B", "C")
Is there any way I can convert this totString = "ABC"Without knowing how many variables I have stored?
Edited by KingofGamesYami, 18 April 2014 - 07:08 AM.
Posted 18 April 2014 - 07:09 AM
for i = 1,#table do
newString = newString .. table[i]
Edited by Dog, 18 April 2014 - 07:09 AM.
Posted 18 April 2014 - 07:11 AM
Posted 18 April 2014 - 07:34 AM
Dog, on 18 April 2014 - 07:09 AM, said:
for i = 1,#table do
newString = newString .. table[i]
theoriginalbit, on 18 April 2014 - 07:11 AM, said:
Posted 18 April 2014 - 12:06 PM
local tbl = {}
tbl[1] = "a"
tbl["a"] = "b"
local str = ""
for _,v in pairs(tbl) do
str = str..v
end
Please note however the order may not be preserved when this method is used.
0 members, 2 guests, 0 anonymous users