lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

It would use one single buffer, possibly with precomputed sufficient size (if, e.g. all operands are strings). The .. operators use a buffer each plus the memory for the (intermediate) result strings. So string.concat() could save memory allocation operations and the multiple copy operations from one buffer into the next.

At least this is my understanding, correct me if I am wrong...

-- Oliver

Am 27.03.2014 00:26, schrieb Luiz Henrique de Figueiredo:
Why not create such a function as a member of the string library?
string.concat( "there ", "I", " would look ",1, "st")
How is that different from just this?
	"there " .. "I" .. " would look ",1 .. "st"