[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Feature proposal: \x## notation in strings
- From: Peter Cawley <lua@...>
- Date: Wed, 11 Mar 2009 12:15:19 +0000
On Wed, Mar 11, 2009 at 10:54 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> if (!isxdigit(cu))
> luaX_lexerror(ls, "hex escape too short", TK_STRING);
> if (isdigit(cu))
> c = 16*c + (cu-'0');
> else
> c = 16*c + (cu-'A'+10);
"The function isxdigit() returns non-zero if its argument is a
hexidecimal digit (i.e. A-F, a-f, or 0-9). Otherwise, zero is
returned. "[1] - your code does not handle the cases of cu being 'a'
through 'f'.
[1] http://www.cppreference.com/wiki/c/string/isxdigit
- References:
- Feature proposal: \x## notation in strings, Ico
- Re: Feature proposal: \x## notation in strings, David Given
- Re: Feature proposal: \x## notation in strings, Eike Decker
- Re: Feature proposal: \x## notation in strings, David Given
- Re: Feature proposal: \x## notation in strings, Philippe Lhoste
- Re: Feature proposal: \x## notation in strings, Roberto Ierusalimschy
- Re: Feature proposal: \x## notation in strings, Philippe Lhoste
- Re: Feature proposal: \x## notation in strings, Enrico Colombini
- RE: Feature proposal: \x## notation in strings, Paul Hudson
- Re: Feature proposal: \x## notation in strings, steve donovan