There is no add operator for rows. Strings are immutable values.
The operator ..concatenates two lines, resulting in a third line:
local b = "con"
local c = "catenate"
local a = b .. c -- "concatenate"
The function table.concatconcatenates the rows in the table, creating a string result:
local t = { "con", "catenate" }
local a = table.concat(t) -- "concatenate"
local t = { "two", "words" }
local a = table.concat(t, " ") -- "two words"
The function string.formataccepts a format template with a list of compatible values, creating the result of the string:
local b = 2
local c = "words"
local a = string.format("%i %s", b, c) -- "2 words"
local t = { 2, "words" }
local a = string.format("%i %s", unpack(t)) -- "2 words"
, , , :
local t = {}
for i = 1, 1000 do
table.insert(t, tostring(i))
end
local a = table.concat(t) -- "1234...9991000"
. . LTN 9: .