[Lua] Adds some useful encoding APIs for Lua (base64 encoding and decoding and such).

This commit is contained in:
Zef Hemel
2025-08-20 13:39:34 +02:00
parent 90487746fd
commit c16dbc12fb
5 changed files with 48 additions and 1 deletions
+9
View File
@@ -0,0 +1,9 @@
local function assertEqual(a, b)
if a ~= b then
error("Assertion failed: " .. a .. " is not equal to " .. b)
end
end
assertEqual(encoding.utf8Decode(encoding.utf8Encode("test")), "test")
assertEqual(encoding.utf8Decode(encoding.base64Decode(encoding.base64Encode("test"))), "test")