lua-users home
lua-l archive

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


Alexander Gladysh wrote:

After all wouldn't you like to look at something like:

x = struct.pack("Bc0", string.len(s), s)

rather than:

x = "\x05hello\x00"

String length is usually a dynamic value, therefore it is not very
useful to hardcode it as a hex value into a string literal.

Alexander, I think you are on the same page as the OP here.

Ralph