[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Feature proposal: \x## notation in strings
- From: Alexander Gladysh <agladysh@...>
- Date: Tue, 10 Mar 2009 01:06:44 +0300
> I'm using Lua a lot for embedded software, which tends to involve quite
> a bit of working with low-level protocols, bits and binary data. One of
> the things I'd personally like to see added in Lua to make my life a bit
> easier is the C-like notation for 'binary' data in strings using
> hexidecimal escape codes like \xNN.
Probably this is a silly question, but is decimal notation not
acceptable? I guess hexadecimals may be a bit more convenient in some
cases, but they should be more or less equivalent.
To quote manual:
A character in a string can also be specified by its numerical value
using the escape sequence \ddd, where ddd is a sequence
of up to three decimal digits.