mirror of
https://github.com/edubart/otclient.git
synced 2025-11-30 23:26:51 +01:00
rework key input handling, add more script events for UI and implement console history
This commit is contained in:
14
modules/core/ext/string.lua
Normal file
14
modules/core/ext/string.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
function string:split(sep)
|
||||
local t = { }
|
||||
local function helper(word)
|
||||
table.insert(t, word)
|
||||
return ""
|
||||
end
|
||||
if not self:gsub("%w+", helper):find("%S") then
|
||||
return t
|
||||
end
|
||||
end
|
||||
|
||||
function string:starts(start)
|
||||
return self:sub(1, #start) == start
|
||||
end
|
||||
Reference in New Issue
Block a user