10 lines
305 B
Lua
10 lines
305 B
Lua
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))
|