lua-users home
lua-l archive

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


Strings containing a \0 can be better compared to tables containing a
0 as number value. Its defined but zero. Its something different than
nil.
Strings cannot contain a "nil character" - as it doesnt exist, but can
carry 0 characters.

On Mon, Dec 13, 2010 at 5:26 PM, Javier Guerra Giraldez
<javier@guerrag.com> wrote:
> On Mon, Dec 13, 2010 at 11:22 AM, HyperHacker <hyperhacker@gmail.com> wrote:
>> I feel this is worth pointing out:
>>> s="ab\0cd"
>>> =#s
>> 5
>>> =s
>> ab
>>
>
> Lua strings can hold any value, including \0, but your console might
> not.  that's not Lua's fault.
>
> --
> Javier
>
>