2 -- (C) 2022 Flecken-chan
3 -- Dis progwam comes with ABSOLUTELY NO WAWWANTY
4 -- Dis iz fwee software, and your'e welcome to redistwibute it under certain conditions
8 "u", "ü", "ǘ", "ú", "ù", "ǜ", "o", "ö", "ø", "ó", "ò", "ð",
9 "U", "Ü", "Ǘ", "Ú", "Ù", "Ǜ", "O", "Ö", "Ø", "Ó", "Ò",
16 local words = {"nya", "rawr", "ara", "awoo"}
18 math.randomseed(69420)
20 function string:randomcase()
24 local c = self:sub(i, i)
26 if math.random() < 0.5 then
43 if math.random() < 0.5 then
49 c = words[math.random(#words)]:randomcase()
52 if math.random() < 0.5 then
61 if arg[1] == "encode" then
68 if buf and c ~= buf then
69 local e = encode[buf:byte(1)] .. " "
74 io.write("" .. num .. "x " .. e)
88 elseif arg[1] == "decode" then
100 local n = buf:sub(-1) == "x" and tonumber(buf:sub(1, -2))
105 if not decode[buf] then
106 error("decode error")
109 local d = string.char(decode[buf])
125 error("trailing data")
128 print("Usage: " .. arg[0] .. " encode|decode")