First commit

This commit is contained in:
2026-02-19 18:51:17 +02:00
commit 2d9b2318a9
16 changed files with 358 additions and 0 deletions

9
exercises/ch04/ex4_6.lua Normal file
View File

@@ -0,0 +1,9 @@
local function remove(str, start, length)
local slice_start = utf8.offset(str, start - 1)
local slice_end = utf8.offset(str, start + length)
local start_part = str:sub(1, slice_start)
local end_part = str:sub(slice_end)
return start_part .. end_part
end
print(remove("ação", 2, 2))