[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A useful useless fact about Lua keywords
- From: Fontana Nicola <ntd@...>
- Date: Thu, 16 Sep 2021 08:05:39 +0200
Il giorno mer, 15/09/2021 alle 15.16 -0300, Luiz Henrique de Figueiredo ha
scritto:
> ...
> do
> local C={}
> for i=0,255 do C[i]=string.char(i); C[C[i]]=i end
> function char(s,i) return C[s:byte(i)] end
> end
> ...
What's the purpose of `C[C[i]]=i`? Can `string.byte` return a string?
Ciao.
--
Nicola
- References:
- A useful useless fact about Lua keywords, Hugo Musso Gualandi
- Re: A useful useless fact about Lua keywords, Marc Balmer
- Re: A useful useless fact about Lua keywords, Hugo Musso Gualandi
- Re: A useful useless fact about Lua keywords, Flyer31 Test
- Re: A useful useless fact about Lua keywords, Viacheslav Usov
- Re: A useful useless fact about Lua keywords, Philippe Verdy
- Re: A useful useless fact about Lua keywords, Flyer31 Test
- Re: A useful useless fact about Lua keywords, Francisco Olarte
- Re: A useful useless fact about Lua keywords, Flyer31 Test
- Re: A useful useless fact about Lua keywords, Luiz Henrique de Figueiredo