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
7 "u", "ü", "ǘ", "ú", "ù", "ǜ", "o", "ö", "ø", "ó", "ò", "ð",
8 "U", "Ü", "Ǘ", "Ú", "Ù", "Ǜ", "O", "Ö", "Ø", "Ó", "Ò",
15 local words = {"nya", "rawr", "ara", "awoo"}
17 math.randomseed(69420)
19 function string:randomcase()
23 local c = self:sub(i, i)
25 if math.random() < 0.5 then
42 if math.random() < 0.5 then
48 c = words[math.random(#words)]:randomcase()
51 if math.random() < 0.5 then
60 if arg[1] == "encode" then
67 if buf and c ~= buf then
68 local e = encode[buf:byte(1)] .. " "
73 io.write("" .. num .. "x " .. e)
87 elseif arg[1] == "decode" then
99 local n = buf:sub(-1) == "x" and tonumber(buf:sub(1, -2))
104 if not decode[buf] then
105 error("decode error")
108 local d = string.char(decode[buf])
124 error("trailing data")
127 print("Usage: " .. arg[0] .. " encode|decode")