1
0
cc-utilities/char-matrix.lua
2023-05-11 21:45:49 +03:00

20 lines
385 B
Lua

-- Print out all available characters in a matrix
print(" |0123456789abcdef")
print("-+----------------")
for i=0, 15 do
io.write(("%x|"):format(i))
for j=0, 15 do
local c = 16*i + j
-- The character 10 is \n. And it messes up the matrix
-- So just write it as a space
if c == 10 then
io.write(" ")
else
io.write(("%c"):format(c, c))
end
end
io.write("\n")
end