lua-users home
lua-l archive

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


> The null character ('\0' in C) is represented in Unicode as a single, zero 
> byte. Will Lua handle this case correctly, since I think it permits strings 
> with '\0' in them?

Lua only uses those functions (from string.h) to manipulate some
restricted sets of strings (such as reserved words or identifiers),
which for sure do not contain zeros, or strings that can be truncated
to their first zero (such as when formatting error messages). (In one
single place, it also uses `strlen' to find any eventual '\0' inside the
string.)

-- Roberto