lua-users home
lua-l archive

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


2014-11-02 8:04 GMT+02:00 Emeka <emekamicro@gmail.com>:
>
> Dirk,
>
> Thanks..so much. From my understanding '[[]]' just stringize its content.

No, it's a non-escaping string delimiter. That means that e.g. \n means
backslash-n, not newline, etc. The only thing it can't contain is ]]; if you
genuinely have that, use [=[ ...]=]; or [==[...]==] etc. Sooner or later you
must have enough = signs to beat the quoted string.

> What about a case where I would want to stringize the returned value
> of a function.

`tostring` is supposed to do that.