lua-users home
lua-l archive

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


str = str .. 'and some added text'

Lua doesn't have mutate operators like +=, and two dots (..) is the
concatenation operator.

On 5/12/07, Aljaz <aljaz.fajmut@siol.net> wrote:
Hello

I'm new to lua and I have read documentation.
However, I'm having difficulties finding out how to 'extend' lua string this
way:
str = 'some string... '
str += 'and some added text'

str would be: 'some string... and some added text'.

Basiclly I want to just add (asign) data to the end of string.
How to do this?

Thanks for help