lua-users home
lua-l archive

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


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