Files
programming-lua/exercises/ch04/ex4_5.lua
2026-02-19 18:51:17 +02:00

8 lines
210 B
Lua

local function remove(str, start, length)
local start_part = str:sub(1, start - 1)
local end_part = str:sub(start + length, -1)
return start_part .. end_part
end
print(remove("hello world", 7, 4))