First commit
This commit is contained in:
7
exercises/ch04/ex4_5.lua
Normal file
7
exercises/ch04/ex4_5.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
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))
|
||||
Reference in New Issue
Block a user