string escape
parent
0b49973d11
commit
6b2ebc3766
2
api.lua
2
api.lua
|
@ -29,6 +29,7 @@ local function esc(x)
|
|||
:gsub('%.', '%%.')
|
||||
:gsub('%,', '%%,')
|
||||
:gsub('%;', '%%;')
|
||||
:gsub('%\\', '%%\\')
|
||||
:gsub('%[', '%%[')
|
||||
:gsub('%]', '%%]')
|
||||
:gsub('%*', '%%*')
|
||||
|
@ -52,6 +53,7 @@ end
|
|||
function x_marketplace.store_find(string)
|
||||
local found = ""
|
||||
local str = esc(string)
|
||||
|
||||
for k, v in pairs(x_marketplace.store_list) do
|
||||
if string.find(k, str) then
|
||||
found = found..k.." buy: "..string.format("%.2f", v.buy).." sell: "..string.format("%.2f", v.sell).."\n"
|
||||
|
|
Loading…
Reference in New Issue